/
organization.go
59 lines (53 loc) · 2.18 KB
/
organization.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package iam
import (
"time"
)
type OrgAddress struct {
Formatted string `json:"formatted,omitempty"`
StreetAddress string `json:"streetAddress,omitempty"`
Locality string `json:"locality,omitempty"`
Region string `json:"region,omitempty"`
PostalCode string `json:"postalCode,omitempty"`
Country string `json:"country,omitempty"`
}
type Meta struct {
ResourceType string `json:"resourceType,omitempty"`
LastModified *time.Time `json:"lastModified,omitempty"`
LastUpdated *time.Time `json:"lastUpdated,omitempty"`
Created *time.Time `json:"created,omitempty"`
UpdatedBy string `json:"updatedBy,omitempty"`
CreatedBy string `json:"createdBy,omitempty"`
Location string `json:"location,omitempty"`
Version string `json:"version,omitempty"` // No
VersionID string `json:"versionId,omitempty"` // Consistency
}
type Attribute struct {
Value string `json:"value,omitempty"`
Ref string `json:"$ref,omitempty"`
Primary bool `json:"primary,omitempty"`
}
// Organization represents a IAM Organization resource
type Organization struct {
Schemas []string `json:"schemas"`
ID string `json:"id"`
ExternalID string `json:"externalId,omitempty"`
Name string `json:"name"`
DisplayName string `json:"displayName,omitempty"`
Description string `json:"description,omitempty"`
Parent Attribute `json:"parent,omitempty"`
Type string `json:"type,omitempty"`
Active bool `json:"active,omitempty"`
InheritProperties bool `json:"inheritProperties,omitempty"`
Address OrgAddress `json:"address,omitempty"`
Owners []Attribute `json:"owners,omitempty"`
CreatedBy *Attribute `json:"createdBy,omitempty"`
ModifiedBy *Attribute `json:"modifiedBy,omitempty"`
Meta *Meta `json:"meta,omitempty"`
}
type OrganizationStatus struct {
Schemas []string `json:"schemas"`
ID string `json:"id"`
Status string `json:"status"`
TotalResources int `json:"totalResources"`
Meta *Meta `json:"meta"`
}