|
| 1 | +// Code based on the AtlasAPI V2 OpenAPI file |
| 2 | + |
| 3 | +package admin |
| 4 | + |
| 5 | +import ( |
| 6 | + "time" |
| 7 | +) |
| 8 | + |
| 9 | +// GroupServiceAccount struct for GroupServiceAccount |
| 10 | +type GroupServiceAccount struct { |
| 11 | + // The Client ID of the Service Account. |
| 12 | + ClientId *string `json:"clientId,omitempty"` |
| 13 | + // The date that the Service Account was created on. |
| 14 | + CreatedAt *time.Time `json:"createdAt,omitempty"` |
| 15 | + // Human readable description for the Service Account. |
| 16 | + Description *string `json:"description,omitempty"` |
| 17 | + // Human-readable name for the Service Account. |
| 18 | + Name *string `json:"name,omitempty"` |
| 19 | + // A list of Project roles associated with the Service Account. |
| 20 | + Roles *[]string `json:"roles,omitempty"` |
| 21 | + // A list of secrets associated with the specified Service Account. |
| 22 | + Secrets *[]ServiceAccountSecret `json:"secrets,omitempty"` |
| 23 | +} |
| 24 | + |
| 25 | +// NewGroupServiceAccount instantiates a new GroupServiceAccount object |
| 26 | +// This constructor will assign default values to properties that have it defined, |
| 27 | +// and makes sure properties required by API are set, but the set of arguments |
| 28 | +// will change when the set of required properties is changed |
| 29 | +func NewGroupServiceAccount() *GroupServiceAccount { |
| 30 | + this := GroupServiceAccount{} |
| 31 | + return &this |
| 32 | +} |
| 33 | + |
| 34 | +// NewGroupServiceAccountWithDefaults instantiates a new GroupServiceAccount object |
| 35 | +// This constructor will only assign default values to properties that have it defined, |
| 36 | +// but it doesn't guarantee that properties required by API are set |
| 37 | +func NewGroupServiceAccountWithDefaults() *GroupServiceAccount { |
| 38 | + this := GroupServiceAccount{} |
| 39 | + return &this |
| 40 | +} |
| 41 | + |
| 42 | +// GetClientId returns the ClientId field value if set, zero value otherwise |
| 43 | +func (o *GroupServiceAccount) GetClientId() string { |
| 44 | + if o == nil || IsNil(o.ClientId) { |
| 45 | + var ret string |
| 46 | + return ret |
| 47 | + } |
| 48 | + return *o.ClientId |
| 49 | +} |
| 50 | + |
| 51 | +// GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise |
| 52 | +// and a boolean to check if the value has been set. |
| 53 | +func (o *GroupServiceAccount) GetClientIdOk() (*string, bool) { |
| 54 | + if o == nil || IsNil(o.ClientId) { |
| 55 | + return nil, false |
| 56 | + } |
| 57 | + |
| 58 | + return o.ClientId, true |
| 59 | +} |
| 60 | + |
| 61 | +// HasClientId returns a boolean if a field has been set. |
| 62 | +func (o *GroupServiceAccount) HasClientId() bool { |
| 63 | + if o != nil && !IsNil(o.ClientId) { |
| 64 | + return true |
| 65 | + } |
| 66 | + |
| 67 | + return false |
| 68 | +} |
| 69 | + |
| 70 | +// SetClientId gets a reference to the given string and assigns it to the ClientId field. |
| 71 | +func (o *GroupServiceAccount) SetClientId(v string) { |
| 72 | + o.ClientId = &v |
| 73 | +} |
| 74 | + |
| 75 | +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise |
| 76 | +func (o *GroupServiceAccount) GetCreatedAt() time.Time { |
| 77 | + if o == nil || IsNil(o.CreatedAt) { |
| 78 | + var ret time.Time |
| 79 | + return ret |
| 80 | + } |
| 81 | + return *o.CreatedAt |
| 82 | +} |
| 83 | + |
| 84 | +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise |
| 85 | +// and a boolean to check if the value has been set. |
| 86 | +func (o *GroupServiceAccount) GetCreatedAtOk() (*time.Time, bool) { |
| 87 | + if o == nil || IsNil(o.CreatedAt) { |
| 88 | + return nil, false |
| 89 | + } |
| 90 | + |
| 91 | + return o.CreatedAt, true |
| 92 | +} |
| 93 | + |
| 94 | +// HasCreatedAt returns a boolean if a field has been set. |
| 95 | +func (o *GroupServiceAccount) HasCreatedAt() bool { |
| 96 | + if o != nil && !IsNil(o.CreatedAt) { |
| 97 | + return true |
| 98 | + } |
| 99 | + |
| 100 | + return false |
| 101 | +} |
| 102 | + |
| 103 | +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. |
| 104 | +func (o *GroupServiceAccount) SetCreatedAt(v time.Time) { |
| 105 | + o.CreatedAt = &v |
| 106 | +} |
| 107 | + |
| 108 | +// GetDescription returns the Description field value if set, zero value otherwise |
| 109 | +func (o *GroupServiceAccount) GetDescription() string { |
| 110 | + if o == nil || IsNil(o.Description) { |
| 111 | + var ret string |
| 112 | + return ret |
| 113 | + } |
| 114 | + return *o.Description |
| 115 | +} |
| 116 | + |
| 117 | +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise |
| 118 | +// and a boolean to check if the value has been set. |
| 119 | +func (o *GroupServiceAccount) GetDescriptionOk() (*string, bool) { |
| 120 | + if o == nil || IsNil(o.Description) { |
| 121 | + return nil, false |
| 122 | + } |
| 123 | + |
| 124 | + return o.Description, true |
| 125 | +} |
| 126 | + |
| 127 | +// HasDescription returns a boolean if a field has been set. |
| 128 | +func (o *GroupServiceAccount) HasDescription() bool { |
| 129 | + if o != nil && !IsNil(o.Description) { |
| 130 | + return true |
| 131 | + } |
| 132 | + |
| 133 | + return false |
| 134 | +} |
| 135 | + |
| 136 | +// SetDescription gets a reference to the given string and assigns it to the Description field. |
| 137 | +func (o *GroupServiceAccount) SetDescription(v string) { |
| 138 | + o.Description = &v |
| 139 | +} |
| 140 | + |
| 141 | +// GetName returns the Name field value if set, zero value otherwise |
| 142 | +func (o *GroupServiceAccount) GetName() string { |
| 143 | + if o == nil || IsNil(o.Name) { |
| 144 | + var ret string |
| 145 | + return ret |
| 146 | + } |
| 147 | + return *o.Name |
| 148 | +} |
| 149 | + |
| 150 | +// GetNameOk returns a tuple with the Name field value if set, nil otherwise |
| 151 | +// and a boolean to check if the value has been set. |
| 152 | +func (o *GroupServiceAccount) GetNameOk() (*string, bool) { |
| 153 | + if o == nil || IsNil(o.Name) { |
| 154 | + return nil, false |
| 155 | + } |
| 156 | + |
| 157 | + return o.Name, true |
| 158 | +} |
| 159 | + |
| 160 | +// HasName returns a boolean if a field has been set. |
| 161 | +func (o *GroupServiceAccount) HasName() bool { |
| 162 | + if o != nil && !IsNil(o.Name) { |
| 163 | + return true |
| 164 | + } |
| 165 | + |
| 166 | + return false |
| 167 | +} |
| 168 | + |
| 169 | +// SetName gets a reference to the given string and assigns it to the Name field. |
| 170 | +func (o *GroupServiceAccount) SetName(v string) { |
| 171 | + o.Name = &v |
| 172 | +} |
| 173 | + |
| 174 | +// GetRoles returns the Roles field value if set, zero value otherwise |
| 175 | +func (o *GroupServiceAccount) GetRoles() []string { |
| 176 | + if o == nil || IsNil(o.Roles) { |
| 177 | + var ret []string |
| 178 | + return ret |
| 179 | + } |
| 180 | + return *o.Roles |
| 181 | +} |
| 182 | + |
| 183 | +// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise |
| 184 | +// and a boolean to check if the value has been set. |
| 185 | +func (o *GroupServiceAccount) GetRolesOk() (*[]string, bool) { |
| 186 | + if o == nil || IsNil(o.Roles) { |
| 187 | + return nil, false |
| 188 | + } |
| 189 | + |
| 190 | + return o.Roles, true |
| 191 | +} |
| 192 | + |
| 193 | +// HasRoles returns a boolean if a field has been set. |
| 194 | +func (o *GroupServiceAccount) HasRoles() bool { |
| 195 | + if o != nil && !IsNil(o.Roles) { |
| 196 | + return true |
| 197 | + } |
| 198 | + |
| 199 | + return false |
| 200 | +} |
| 201 | + |
| 202 | +// SetRoles gets a reference to the given []string and assigns it to the Roles field. |
| 203 | +func (o *GroupServiceAccount) SetRoles(v []string) { |
| 204 | + o.Roles = &v |
| 205 | +} |
| 206 | + |
| 207 | +// GetSecrets returns the Secrets field value if set, zero value otherwise |
| 208 | +func (o *GroupServiceAccount) GetSecrets() []ServiceAccountSecret { |
| 209 | + if o == nil || IsNil(o.Secrets) { |
| 210 | + var ret []ServiceAccountSecret |
| 211 | + return ret |
| 212 | + } |
| 213 | + return *o.Secrets |
| 214 | +} |
| 215 | + |
| 216 | +// GetSecretsOk returns a tuple with the Secrets field value if set, nil otherwise |
| 217 | +// and a boolean to check if the value has been set. |
| 218 | +func (o *GroupServiceAccount) GetSecretsOk() (*[]ServiceAccountSecret, bool) { |
| 219 | + if o == nil || IsNil(o.Secrets) { |
| 220 | + return nil, false |
| 221 | + } |
| 222 | + |
| 223 | + return o.Secrets, true |
| 224 | +} |
| 225 | + |
| 226 | +// HasSecrets returns a boolean if a field has been set. |
| 227 | +func (o *GroupServiceAccount) HasSecrets() bool { |
| 228 | + if o != nil && !IsNil(o.Secrets) { |
| 229 | + return true |
| 230 | + } |
| 231 | + |
| 232 | + return false |
| 233 | +} |
| 234 | + |
| 235 | +// SetSecrets gets a reference to the given []ServiceAccountSecret and assigns it to the Secrets field. |
| 236 | +func (o *GroupServiceAccount) SetSecrets(v []ServiceAccountSecret) { |
| 237 | + o.Secrets = &v |
| 238 | +} |
0 commit comments