Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 77645de

Browse files
committed
Switch to string as results are sometimes not parseable
We don’t want failing calls due to meta data
1 parent 0e92764 commit 77645de

File tree

4 files changed

+17
-25
lines changed

4 files changed

+17
-25
lines changed

iam/clients_service.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"bytes"
55
"fmt"
66
"net/http"
7-
"time"
87

98
validator "github.com/go-playground/validator/v10"
109
)
@@ -33,8 +32,8 @@ type ApplicationClient struct {
3332
RefreshTokenLifetime int `json:"refreshTokenLifetime,omitempty" validate:"min=0,max=157680000"`
3433
IDTokenLifetime int `json:"idTokenLifetime,omitempty" validate:"min=0,max=31536000"`
3534
Meta struct {
36-
VersionID string `json:"versionId,omitempty"`
37-
LastModified time.Time `json:"lastModified,omitempty"`
35+
VersionID string `json:"versionId,omitempty"`
36+
LastModified string `json:"lastModified,omitempty"`
3837
} `json:"meta,omitempty"`
3938
}
4039

iam/mfa_policy.go

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
package iam
22

3-
import (
4-
"time"
5-
)
6-
73
type MFAPolicy struct {
84
Schemas []string `json:"schemas" validate:"min=1"`
95
ID string `json:"id,omitempty" validate:"omitempty,min=1,max=256"`
@@ -31,11 +27,11 @@ type MFAPolicyResource struct {
3127
}
3228

3329
type MFAPolicyMeta struct {
34-
ResourceType string `json:"resourceType,omitempty"`
35-
Created *time.Time `json:"created,omitempty"`
36-
LastModified *time.Time `json:"lastModified,omitempty"`
37-
Location string `json:"location,omitempty"`
38-
Version string `json:"version,omitempty"`
30+
ResourceType string `json:"resourceType,omitempty"`
31+
Created string `json:"created,omitempty"`
32+
LastModified string `json:"lastModified,omitempty"`
33+
Location string `json:"location,omitempty"`
34+
Version string `json:"version,omitempty"`
3935
}
4036

4137
func (p *MFAPolicy) SetActive(val bool) {

iam/organization.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package iam
22

3-
import "time"
4-
53
type OrgAddress struct {
64
Formatted string `json:"formatted,omitempty"`
75
StreetAddress string `json:"streetAddress,omitempty"`
@@ -12,11 +10,11 @@ type OrgAddress struct {
1210
}
1311

1412
type Meta struct {
15-
ResourceType string `json:"resourceType,omitempty"`
16-
Created time.Time `json:"created,omitempty"`
17-
LastModified time.Time `json:"lastModified,omitempty"`
18-
Location string `json:"location,omitempty"`
19-
Version string `json:"version,omitempty"`
13+
ResourceType string `json:"resourceType,omitempty"`
14+
Created string `json:"created,omitempty"`
15+
LastModified string `json:"lastModified,omitempty"`
16+
Location string `json:"location,omitempty"`
17+
Version string `json:"version,omitempty"`
2018
}
2119

2220
type Attribute struct {

iam/organizations_service.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"bytes"
55
"fmt"
66
"net/http"
7-
"time"
87
)
98

109
const (
@@ -29,11 +28,11 @@ type OrganizationStatus struct {
2928
Status string `json:"status"`
3029
TotalResources int `json:"totalResources"`
3130
Meta struct {
32-
ResourceType string `json:"resourceType"`
33-
Created time.Time `json:"created"`
34-
LastModified time.Time `json:"lastModified"`
35-
Location string `json:"location"`
36-
Version string `json:"version"`
31+
ResourceType string `json:"resourceType"`
32+
Created string `json:"created"`
33+
LastModified string `json:"lastModified"`
34+
Location string `json:"location"`
35+
Version string `json:"version"`
3736
} `json:"meta"`
3837
}
3938

0 commit comments

Comments
 (0)