-
Notifications
You must be signed in to change notification settings - Fork 2
/
personalclient.go
120 lines (104 loc) · 2.71 KB
/
personalclient.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
package shared
import (
"github.com/conductorone/conductorone-sdk-go/pkg/utils"
"time"
)
// The PersonalClient message contains information about a presonal client credential.
type PersonalClient struct {
// If set, only allows the CIDRs in the array to use the credential.
AllowSourceCidr []string `json:"allowSourceCidr,omitempty"`
// The clientID of the credential.
ClientID *string `json:"clientId,omitempty"`
CreatedAt *time.Time `json:"createdAt,omitempty"`
DeletedAt *time.Time `json:"deletedAt,omitempty"`
// The display name of the personal client credential.
DisplayName *string `json:"displayName,omitempty"`
ExpiresTime *time.Time `json:"expiresTime,omitempty"`
// The unique ID of the personal client credential.
ID *string `json:"id,omitempty"`
LastUsedAt *time.Time `json:"lastUsedAt,omitempty"`
// scoped_roles provides a list of IAM Roles
// that this OAuth2 Client's API permissions
// are reduced to. The permissions granted to OAuth2 Client
// are AND'ed against the owning User's own permissions.
ScopedRoles []string `json:"scopedRoles,omitempty"`
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
// The ID of the user that this credential is created for.
UserID *string `json:"userId,omitempty"`
}
func (p PersonalClient) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(p, "", false)
}
func (p *PersonalClient) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &p, "", false, false); err != nil {
return err
}
return nil
}
func (o *PersonalClient) GetAllowSourceCidr() []string {
if o == nil {
return nil
}
return o.AllowSourceCidr
}
func (o *PersonalClient) GetClientID() *string {
if o == nil {
return nil
}
return o.ClientID
}
func (o *PersonalClient) GetCreatedAt() *time.Time {
if o == nil {
return nil
}
return o.CreatedAt
}
func (o *PersonalClient) GetDeletedAt() *time.Time {
if o == nil {
return nil
}
return o.DeletedAt
}
func (o *PersonalClient) GetDisplayName() *string {
if o == nil {
return nil
}
return o.DisplayName
}
func (o *PersonalClient) GetExpiresTime() *time.Time {
if o == nil {
return nil
}
return o.ExpiresTime
}
func (o *PersonalClient) GetID() *string {
if o == nil {
return nil
}
return o.ID
}
func (o *PersonalClient) GetLastUsedAt() *time.Time {
if o == nil {
return nil
}
return o.LastUsedAt
}
func (o *PersonalClient) GetScopedRoles() []string {
if o == nil {
return nil
}
return o.ScopedRoles
}
func (o *PersonalClient) GetUpdatedAt() *time.Time {
if o == nil {
return nil
}
return o.UpdatedAt
}
func (o *PersonalClient) GetUserID() *string {
if o == nil {
return nil
}
return o.UserID
}