diff --git a/services/serviceaccount/model_access_token.go b/services/serviceaccount/model_access_token.go index 2c2a84aff..4db4c983b 100644 --- a/services/serviceaccount/model_access_token.go +++ b/services/serviceaccount/model_access_token.go @@ -11,13 +11,9 @@ API version: 2.0 package serviceaccount import ( - "encoding/json" "time" ) -// checks if the AccessToken type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AccessToken{} - // AccessToken Contains token metadata and actual token. type AccessToken struct { // Newly created access tokens are valid, and can be revoked if needed. @@ -36,193 +32,3 @@ type AccessToken struct { // REQUIRED ValidUntil *time.Time `json:"validUntil"` } - -type _AccessToken AccessToken - -// NewAccessToken instantiates a new AccessToken object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAccessToken(active *bool, createdAt *time.Time, id *string, token *string, validUntil *time.Time) *AccessToken { - this := AccessToken{} - this.Active = active - this.CreatedAt = createdAt - this.Id = id - this.Token = token - this.ValidUntil = validUntil - return &this -} - -// NewAccessTokenWithDefaults instantiates a new AccessToken object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAccessTokenWithDefaults() *AccessToken { - this := AccessToken{} - return &this -} - -// GetActive returns the Active field value -func (o *AccessToken) GetActive() *bool { - if o == nil { - var ret *bool - return ret - } - - return o.Active -} - -// GetActiveOk returns a tuple with the Active field value -// and a boolean to check if the value has been set. -func (o *AccessToken) GetActiveOk() (*bool, bool) { - if o == nil { - return nil, false - } - return o.Active, true -} - -// SetActive sets field value -func (o *AccessToken) SetActive(v *bool) { - o.Active = v -} - -// GetCreatedAt returns the CreatedAt field value -func (o *AccessToken) GetCreatedAt() *time.Time { - if o == nil { - var ret *time.Time - return ret - } - - return o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value -// and a boolean to check if the value has been set. -func (o *AccessToken) GetCreatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.CreatedAt, true -} - -// SetCreatedAt sets field value -func (o *AccessToken) SetCreatedAt(v *time.Time) { - o.CreatedAt = v -} - -// GetId returns the Id field value -func (o *AccessToken) GetId() *string { - if o == nil { - var ret *string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *AccessToken) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Id, true -} - -// SetId sets field value -func (o *AccessToken) SetId(v *string) { - o.Id = v -} - -// GetToken returns the Token field value -func (o *AccessToken) GetToken() *string { - if o == nil { - var ret *string - return ret - } - - return o.Token -} - -// GetTokenOk returns a tuple with the Token field value -// and a boolean to check if the value has been set. -func (o *AccessToken) GetTokenOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Token, true -} - -// SetToken sets field value -func (o *AccessToken) SetToken(v *string) { - o.Token = v -} - -// GetValidUntil returns the ValidUntil field value -func (o *AccessToken) GetValidUntil() *time.Time { - if o == nil { - var ret *time.Time - return ret - } - - return o.ValidUntil -} - -// GetValidUntilOk returns a tuple with the ValidUntil field value -// and a boolean to check if the value has been set. -func (o *AccessToken) GetValidUntilOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.ValidUntil, true -} - -// SetValidUntil sets field value -func (o *AccessToken) SetValidUntil(v *time.Time) { - o.ValidUntil = v -} - -func (o AccessToken) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["active"] = o.Active - toSerialize["createdAt"] = o.CreatedAt - toSerialize["id"] = o.Id - toSerialize["token"] = o.Token - toSerialize["validUntil"] = o.ValidUntil - return toSerialize, nil -} - -type NullableAccessToken struct { - value *AccessToken - isSet bool -} - -func (v NullableAccessToken) Get() *AccessToken { - return v.value -} - -func (v *NullableAccessToken) Set(val *AccessToken) { - v.value = val - v.isSet = true -} - -func (v NullableAccessToken) IsSet() bool { - return v.isSet -} - -func (v *NullableAccessToken) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAccessToken(val *AccessToken) *NullableAccessToken { - return &NullableAccessToken{value: val, isSet: true} -} - -func (v NullableAccessToken) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAccessToken) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/serviceaccount/model_access_token_metadata.go b/services/serviceaccount/model_access_token_metadata.go index 2cadb1eb6..7d94cf0d5 100644 --- a/services/serviceaccount/model_access_token_metadata.go +++ b/services/serviceaccount/model_access_token_metadata.go @@ -11,13 +11,9 @@ API version: 2.0 package serviceaccount import ( - "encoding/json" "time" ) -// checks if the AccessTokenMetadata type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AccessTokenMetadata{} - // AccessTokenMetadata Does not contain the actual token. type AccessTokenMetadata struct { // If true, access token can be used for authorized API calls, if false, the token is not usable anymore. @@ -33,167 +29,3 @@ type AccessTokenMetadata struct { // REQUIRED ValidUntil *time.Time `json:"validUntil"` } - -type _AccessTokenMetadata AccessTokenMetadata - -// NewAccessTokenMetadata instantiates a new AccessTokenMetadata object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAccessTokenMetadata(active *bool, createdAt *time.Time, id *string, validUntil *time.Time) *AccessTokenMetadata { - this := AccessTokenMetadata{} - this.Active = active - this.CreatedAt = createdAt - this.Id = id - this.ValidUntil = validUntil - return &this -} - -// NewAccessTokenMetadataWithDefaults instantiates a new AccessTokenMetadata object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAccessTokenMetadataWithDefaults() *AccessTokenMetadata { - this := AccessTokenMetadata{} - return &this -} - -// GetActive returns the Active field value -func (o *AccessTokenMetadata) GetActive() *bool { - if o == nil { - var ret *bool - return ret - } - - return o.Active -} - -// GetActiveOk returns a tuple with the Active field value -// and a boolean to check if the value has been set. -func (o *AccessTokenMetadata) GetActiveOk() (*bool, bool) { - if o == nil { - return nil, false - } - return o.Active, true -} - -// SetActive sets field value -func (o *AccessTokenMetadata) SetActive(v *bool) { - o.Active = v -} - -// GetCreatedAt returns the CreatedAt field value -func (o *AccessTokenMetadata) GetCreatedAt() *time.Time { - if o == nil { - var ret *time.Time - return ret - } - - return o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value -// and a boolean to check if the value has been set. -func (o *AccessTokenMetadata) GetCreatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.CreatedAt, true -} - -// SetCreatedAt sets field value -func (o *AccessTokenMetadata) SetCreatedAt(v *time.Time) { - o.CreatedAt = v -} - -// GetId returns the Id field value -func (o *AccessTokenMetadata) GetId() *string { - if o == nil { - var ret *string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *AccessTokenMetadata) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Id, true -} - -// SetId sets field value -func (o *AccessTokenMetadata) SetId(v *string) { - o.Id = v -} - -// GetValidUntil returns the ValidUntil field value -func (o *AccessTokenMetadata) GetValidUntil() *time.Time { - if o == nil { - var ret *time.Time - return ret - } - - return o.ValidUntil -} - -// GetValidUntilOk returns a tuple with the ValidUntil field value -// and a boolean to check if the value has been set. -func (o *AccessTokenMetadata) GetValidUntilOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.ValidUntil, true -} - -// SetValidUntil sets field value -func (o *AccessTokenMetadata) SetValidUntil(v *time.Time) { - o.ValidUntil = v -} - -func (o AccessTokenMetadata) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["active"] = o.Active - toSerialize["createdAt"] = o.CreatedAt - toSerialize["id"] = o.Id - toSerialize["validUntil"] = o.ValidUntil - return toSerialize, nil -} - -type NullableAccessTokenMetadata struct { - value *AccessTokenMetadata - isSet bool -} - -func (v NullableAccessTokenMetadata) Get() *AccessTokenMetadata { - return v.value -} - -func (v *NullableAccessTokenMetadata) Set(val *AccessTokenMetadata) { - v.value = val - v.isSet = true -} - -func (v NullableAccessTokenMetadata) IsSet() bool { - return v.isSet -} - -func (v *NullableAccessTokenMetadata) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAccessTokenMetadata(val *AccessTokenMetadata) *NullableAccessTokenMetadata { - return &NullableAccessTokenMetadata{value: val, isSet: true} -} - -func (v NullableAccessTokenMetadata) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAccessTokenMetadata) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/serviceaccount/model_auth_error.go b/services/serviceaccount/model_auth_error.go index db64f831d..77710b175 100644 --- a/services/serviceaccount/model_auth_error.go +++ b/services/serviceaccount/model_auth_error.go @@ -10,101 +10,8 @@ API version: 2.0 package serviceaccount -import ( - "encoding/json" -) - -// checks if the AuthError type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AuthError{} - // AuthError struct for AuthError type AuthError struct { // REQUIRED Error *AuthErrorError `json:"error"` } - -type _AuthError AuthError - -// NewAuthError instantiates a new AuthError object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAuthError(error_ *AuthErrorError) *AuthError { - this := AuthError{} - this.Error = error_ - return &this -} - -// NewAuthErrorWithDefaults instantiates a new AuthError object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAuthErrorWithDefaults() *AuthError { - this := AuthError{} - return &this -} - -// GetError returns the Error field value -func (o *AuthError) GetError() *AuthErrorError { - if o == nil { - var ret *AuthErrorError - return ret - } - - return o.Error -} - -// GetErrorOk returns a tuple with the Error field value -// and a boolean to check if the value has been set. -func (o *AuthError) GetErrorOk() (*AuthErrorError, bool) { - if o == nil { - return nil, false - } - return o.Error, true -} - -// SetError sets field value -func (o *AuthError) SetError(v *AuthErrorError) { - o.Error = v -} - -func (o AuthError) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["error"] = o.Error - return toSerialize, nil -} - -type NullableAuthError struct { - value *AuthError - isSet bool -} - -func (v NullableAuthError) Get() *AuthError { - return v.value -} - -func (v *NullableAuthError) Set(val *AuthError) { - v.value = val - v.isSet = true -} - -func (v NullableAuthError) IsSet() bool { - return v.isSet -} - -func (v *NullableAuthError) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAuthError(val *AuthError) *NullableAuthError { - return &NullableAuthError{value: val, isSet: true} -} - -func (v NullableAuthError) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAuthError) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/serviceaccount/model_auth_error_error.go b/services/serviceaccount/model_auth_error_error.go index c6b91e749..1e44b40cd 100644 --- a/services/serviceaccount/model_auth_error_error.go +++ b/services/serviceaccount/model_auth_error_error.go @@ -10,13 +10,6 @@ API version: 2.0 package serviceaccount -import ( - "encoding/json" -) - -// checks if the AuthErrorError type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AuthErrorError{} - // AuthErrorError struct for AuthErrorError type AuthErrorError struct { // REQUIRED @@ -26,141 +19,3 @@ type AuthErrorError struct { // REQUIRED Status *string `json:"status"` } - -type _AuthErrorError AuthErrorError - -// NewAuthErrorError instantiates a new AuthErrorError object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAuthErrorError(code *int64, message *string, status *string) *AuthErrorError { - this := AuthErrorError{} - this.Code = code - this.Message = message - this.Status = status - return &this -} - -// NewAuthErrorErrorWithDefaults instantiates a new AuthErrorError object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAuthErrorErrorWithDefaults() *AuthErrorError { - this := AuthErrorError{} - return &this -} - -// GetCode returns the Code field value -func (o *AuthErrorError) GetCode() *int64 { - if o == nil { - var ret *int64 - return ret - } - - return o.Code -} - -// GetCodeOk returns a tuple with the Code field value -// and a boolean to check if the value has been set. -func (o *AuthErrorError) GetCodeOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.Code, true -} - -// SetCode sets field value -func (o *AuthErrorError) SetCode(v *int64) { - o.Code = v -} - -// GetMessage returns the Message field value -func (o *AuthErrorError) GetMessage() *string { - if o == nil { - var ret *string - return ret - } - - return o.Message -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *AuthErrorError) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Message, true -} - -// SetMessage sets field value -func (o *AuthErrorError) SetMessage(v *string) { - o.Message = v -} - -// GetStatus returns the Status field value -func (o *AuthErrorError) GetStatus() *string { - if o == nil { - var ret *string - return ret - } - - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -func (o *AuthErrorError) GetStatusOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Status, true -} - -// SetStatus sets field value -func (o *AuthErrorError) SetStatus(v *string) { - o.Status = v -} - -func (o AuthErrorError) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["code"] = o.Code - toSerialize["message"] = o.Message - toSerialize["status"] = o.Status - return toSerialize, nil -} - -type NullableAuthErrorError struct { - value *AuthErrorError - isSet bool -} - -func (v NullableAuthErrorError) Get() *AuthErrorError { - return v.value -} - -func (v *NullableAuthErrorError) Set(val *AuthErrorError) { - v.value = val - v.isSet = true -} - -func (v NullableAuthErrorError) IsSet() bool { - return v.isSet -} - -func (v *NullableAuthErrorError) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAuthErrorError(val *AuthErrorError) *NullableAuthErrorError { - return &NullableAuthErrorError{value: val, isSet: true} -} - -func (v NullableAuthErrorError) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAuthErrorError) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/serviceaccount/model_create_access_token_payload.go b/services/serviceaccount/model_create_access_token_payload.go index fcfb40a98..d16e54eb6 100644 --- a/services/serviceaccount/model_create_access_token_payload.go +++ b/services/serviceaccount/model_create_access_token_payload.go @@ -10,102 +10,9 @@ API version: 2.0 package serviceaccount -import ( - "encoding/json" -) - -// checks if the CreateAccessTokenPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateAccessTokenPayload{} - // CreateAccessTokenPayload struct for CreateAccessTokenPayload type CreateAccessTokenPayload struct { // The duration in days for how long the new Access Token should be valid. // REQUIRED TtlDays *int64 `json:"ttlDays"` } - -type _CreateAccessTokenPayload CreateAccessTokenPayload - -// NewCreateAccessTokenPayload instantiates a new CreateAccessTokenPayload object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreateAccessTokenPayload(ttlDays *int64) *CreateAccessTokenPayload { - this := CreateAccessTokenPayload{} - this.TtlDays = ttlDays - return &this -} - -// NewCreateAccessTokenPayloadWithDefaults instantiates a new CreateAccessTokenPayload object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateAccessTokenPayloadWithDefaults() *CreateAccessTokenPayload { - this := CreateAccessTokenPayload{} - return &this -} - -// GetTtlDays returns the TtlDays field value -func (o *CreateAccessTokenPayload) GetTtlDays() *int64 { - if o == nil { - var ret *int64 - return ret - } - - return o.TtlDays -} - -// GetTtlDaysOk returns a tuple with the TtlDays field value -// and a boolean to check if the value has been set. -func (o *CreateAccessTokenPayload) GetTtlDaysOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.TtlDays, true -} - -// SetTtlDays sets field value -func (o *CreateAccessTokenPayload) SetTtlDays(v *int64) { - o.TtlDays = v -} - -func (o CreateAccessTokenPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["ttlDays"] = o.TtlDays - return toSerialize, nil -} - -type NullableCreateAccessTokenPayload struct { - value *CreateAccessTokenPayload - isSet bool -} - -func (v NullableCreateAccessTokenPayload) Get() *CreateAccessTokenPayload { - return v.value -} - -func (v *NullableCreateAccessTokenPayload) Set(val *CreateAccessTokenPayload) { - v.value = val - v.isSet = true -} - -func (v NullableCreateAccessTokenPayload) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateAccessTokenPayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateAccessTokenPayload(val *CreateAccessTokenPayload) *NullableCreateAccessTokenPayload { - return &NullableCreateAccessTokenPayload{value: val, isSet: true} -} - -func (v NullableCreateAccessTokenPayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateAccessTokenPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/serviceaccount/model_create_service_account_key_payload.go b/services/serviceaccount/model_create_service_account_key_payload.go index 8bdc5c10b..2b17a9f27 100644 --- a/services/serviceaccount/model_create_service_account_key_payload.go +++ b/services/serviceaccount/model_create_service_account_key_payload.go @@ -11,13 +11,9 @@ API version: 2.0 package serviceaccount import ( - "encoding/json" "time" ) -// checks if the CreateServiceAccountKeyPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateServiceAccountKeyPayload{} - // CreateServiceAccountKeyPayload struct for CreateServiceAccountKeyPayload type CreateServiceAccountKeyPayload struct { // Optional, public key part of the user generated RSA key-pair wrapped in a [X.509 v3 certificate](https://www.rfc-editor.org/rfc/rfc5280) @@ -25,131 +21,3 @@ type CreateServiceAccountKeyPayload struct { // Optional, date of key expiration. When omitted, key is valid until deleted ValidUntil *time.Time `json:"validUntil,omitempty"` } - -// NewCreateServiceAccountKeyPayload instantiates a new CreateServiceAccountKeyPayload object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreateServiceAccountKeyPayload() *CreateServiceAccountKeyPayload { - this := CreateServiceAccountKeyPayload{} - return &this -} - -// NewCreateServiceAccountKeyPayloadWithDefaults instantiates a new CreateServiceAccountKeyPayload object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateServiceAccountKeyPayloadWithDefaults() *CreateServiceAccountKeyPayload { - this := CreateServiceAccountKeyPayload{} - return &this -} - -// GetPublicKey returns the PublicKey field value if set, zero value otherwise. -func (o *CreateServiceAccountKeyPayload) GetPublicKey() *string { - if o == nil || IsNil(o.PublicKey) { - var ret *string - return ret - } - return o.PublicKey -} - -// GetPublicKeyOk returns a tuple with the PublicKey field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateServiceAccountKeyPayload) GetPublicKeyOk() (*string, bool) { - if o == nil || IsNil(o.PublicKey) { - return nil, false - } - return o.PublicKey, true -} - -// HasPublicKey returns a boolean if a field has been set. -func (o *CreateServiceAccountKeyPayload) HasPublicKey() bool { - if o != nil && !IsNil(o.PublicKey) { - return true - } - - return false -} - -// SetPublicKey gets a reference to the given string and assigns it to the PublicKey field. -func (o *CreateServiceAccountKeyPayload) SetPublicKey(v *string) { - o.PublicKey = v -} - -// GetValidUntil returns the ValidUntil field value if set, zero value otherwise. -func (o *CreateServiceAccountKeyPayload) GetValidUntil() *time.Time { - if o == nil || IsNil(o.ValidUntil) { - var ret *time.Time - return ret - } - return o.ValidUntil -} - -// GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateServiceAccountKeyPayload) GetValidUntilOk() (*time.Time, bool) { - if o == nil || IsNil(o.ValidUntil) { - return nil, false - } - return o.ValidUntil, true -} - -// HasValidUntil returns a boolean if a field has been set. -func (o *CreateServiceAccountKeyPayload) HasValidUntil() bool { - if o != nil && !IsNil(o.ValidUntil) { - return true - } - - return false -} - -// SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. -func (o *CreateServiceAccountKeyPayload) SetValidUntil(v *time.Time) { - o.ValidUntil = v -} - -func (o CreateServiceAccountKeyPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.PublicKey) { - toSerialize["publicKey"] = o.PublicKey - } - if !IsNil(o.ValidUntil) { - toSerialize["validUntil"] = o.ValidUntil - } - return toSerialize, nil -} - -type NullableCreateServiceAccountKeyPayload struct { - value *CreateServiceAccountKeyPayload - isSet bool -} - -func (v NullableCreateServiceAccountKeyPayload) Get() *CreateServiceAccountKeyPayload { - return v.value -} - -func (v *NullableCreateServiceAccountKeyPayload) Set(val *CreateServiceAccountKeyPayload) { - v.value = val - v.isSet = true -} - -func (v NullableCreateServiceAccountKeyPayload) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateServiceAccountKeyPayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateServiceAccountKeyPayload(val *CreateServiceAccountKeyPayload) *NullableCreateServiceAccountKeyPayload { - return &NullableCreateServiceAccountKeyPayload{value: val, isSet: true} -} - -func (v NullableCreateServiceAccountKeyPayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateServiceAccountKeyPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/serviceaccount/model_create_service_account_key_response.go b/services/serviceaccount/model_create_service_account_key_response.go index 130def2bc..64b925588 100644 --- a/services/serviceaccount/model_create_service_account_key_response.go +++ b/services/serviceaccount/model_create_service_account_key_response.go @@ -11,13 +11,9 @@ API version: 2.0 package serviceaccount import ( - "encoding/json" "time" ) -// checks if the CreateServiceAccountKeyResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateServiceAccountKeyResponse{} - // CreateServiceAccountKeyResponse struct for CreateServiceAccountKeyResponse type CreateServiceAccountKeyResponse struct { // REQUIRED @@ -42,306 +38,3 @@ type CreateServiceAccountKeyResponse struct { // If specified, the timestamp until the key is active. May be null ValidUntil *time.Time `json:"validUntil,omitempty"` } - -type _CreateServiceAccountKeyResponse CreateServiceAccountKeyResponse - -// NewCreateServiceAccountKeyResponse instantiates a new CreateServiceAccountKeyResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreateServiceAccountKeyResponse(active *bool, createdAt *time.Time, credentials *CreateServiceAccountKeyResponseCredentials, id *string, keyAlgorithm *string, keyOrigin *string, keyType *string, publicKey *string) *CreateServiceAccountKeyResponse { - this := CreateServiceAccountKeyResponse{} - this.Active = active - this.CreatedAt = createdAt - this.Credentials = credentials - this.Id = id - this.KeyAlgorithm = keyAlgorithm - this.KeyOrigin = keyOrigin - this.KeyType = keyType - this.PublicKey = publicKey - return &this -} - -// NewCreateServiceAccountKeyResponseWithDefaults instantiates a new CreateServiceAccountKeyResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateServiceAccountKeyResponseWithDefaults() *CreateServiceAccountKeyResponse { - this := CreateServiceAccountKeyResponse{} - return &this -} - -// GetActive returns the Active field value -func (o *CreateServiceAccountKeyResponse) GetActive() *bool { - if o == nil { - var ret *bool - return ret - } - - return o.Active -} - -// GetActiveOk returns a tuple with the Active field value -// and a boolean to check if the value has been set. -func (o *CreateServiceAccountKeyResponse) GetActiveOk() (*bool, bool) { - if o == nil { - return nil, false - } - return o.Active, true -} - -// SetActive sets field value -func (o *CreateServiceAccountKeyResponse) SetActive(v *bool) { - o.Active = v -} - -// GetCreatedAt returns the CreatedAt field value -func (o *CreateServiceAccountKeyResponse) GetCreatedAt() *time.Time { - if o == nil { - var ret *time.Time - return ret - } - - return o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value -// and a boolean to check if the value has been set. -func (o *CreateServiceAccountKeyResponse) GetCreatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.CreatedAt, true -} - -// SetCreatedAt sets field value -func (o *CreateServiceAccountKeyResponse) SetCreatedAt(v *time.Time) { - o.CreatedAt = v -} - -// GetCredentials returns the Credentials field value -func (o *CreateServiceAccountKeyResponse) GetCredentials() *CreateServiceAccountKeyResponseCredentials { - if o == nil { - var ret *CreateServiceAccountKeyResponseCredentials - return ret - } - - return o.Credentials -} - -// GetCredentialsOk returns a tuple with the Credentials field value -// and a boolean to check if the value has been set. -func (o *CreateServiceAccountKeyResponse) GetCredentialsOk() (*CreateServiceAccountKeyResponseCredentials, bool) { - if o == nil { - return nil, false - } - return o.Credentials, true -} - -// SetCredentials sets field value -func (o *CreateServiceAccountKeyResponse) SetCredentials(v *CreateServiceAccountKeyResponseCredentials) { - o.Credentials = v -} - -// GetId returns the Id field value -func (o *CreateServiceAccountKeyResponse) GetId() *string { - if o == nil { - var ret *string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *CreateServiceAccountKeyResponse) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Id, true -} - -// SetId sets field value -func (o *CreateServiceAccountKeyResponse) SetId(v *string) { - o.Id = v -} - -// GetKeyAlgorithm returns the KeyAlgorithm field value -func (o *CreateServiceAccountKeyResponse) GetKeyAlgorithm() *string { - if o == nil { - var ret *string - return ret - } - - return o.KeyAlgorithm -} - -// GetKeyAlgorithmOk returns a tuple with the KeyAlgorithm field value -// and a boolean to check if the value has been set. -func (o *CreateServiceAccountKeyResponse) GetKeyAlgorithmOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.KeyAlgorithm, true -} - -// SetKeyAlgorithm sets field value -func (o *CreateServiceAccountKeyResponse) SetKeyAlgorithm(v *string) { - o.KeyAlgorithm = v -} - -// GetKeyOrigin returns the KeyOrigin field value -func (o *CreateServiceAccountKeyResponse) GetKeyOrigin() *string { - if o == nil { - var ret *string - return ret - } - - return o.KeyOrigin -} - -// GetKeyOriginOk returns a tuple with the KeyOrigin field value -// and a boolean to check if the value has been set. -func (o *CreateServiceAccountKeyResponse) GetKeyOriginOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.KeyOrigin, true -} - -// SetKeyOrigin sets field value -func (o *CreateServiceAccountKeyResponse) SetKeyOrigin(v *string) { - o.KeyOrigin = v -} - -// GetKeyType returns the KeyType field value -func (o *CreateServiceAccountKeyResponse) GetKeyType() *string { - if o == nil { - var ret *string - return ret - } - - return o.KeyType -} - -// GetKeyTypeOk returns a tuple with the KeyType field value -// and a boolean to check if the value has been set. -func (o *CreateServiceAccountKeyResponse) GetKeyTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.KeyType, true -} - -// SetKeyType sets field value -func (o *CreateServiceAccountKeyResponse) SetKeyType(v *string) { - o.KeyType = v -} - -// GetPublicKey returns the PublicKey field value -func (o *CreateServiceAccountKeyResponse) GetPublicKey() *string { - if o == nil { - var ret *string - return ret - } - - return o.PublicKey -} - -// GetPublicKeyOk returns a tuple with the PublicKey field value -// and a boolean to check if the value has been set. -func (o *CreateServiceAccountKeyResponse) GetPublicKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.PublicKey, true -} - -// SetPublicKey sets field value -func (o *CreateServiceAccountKeyResponse) SetPublicKey(v *string) { - o.PublicKey = v -} - -// GetValidUntil returns the ValidUntil field value if set, zero value otherwise. -func (o *CreateServiceAccountKeyResponse) GetValidUntil() *time.Time { - if o == nil || IsNil(o.ValidUntil) { - var ret *time.Time - return ret - } - return o.ValidUntil -} - -// GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateServiceAccountKeyResponse) GetValidUntilOk() (*time.Time, bool) { - if o == nil || IsNil(o.ValidUntil) { - return nil, false - } - return o.ValidUntil, true -} - -// HasValidUntil returns a boolean if a field has been set. -func (o *CreateServiceAccountKeyResponse) HasValidUntil() bool { - if o != nil && !IsNil(o.ValidUntil) { - return true - } - - return false -} - -// SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. -func (o *CreateServiceAccountKeyResponse) SetValidUntil(v *time.Time) { - o.ValidUntil = v -} - -func (o CreateServiceAccountKeyResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["active"] = o.Active - toSerialize["createdAt"] = o.CreatedAt - toSerialize["credentials"] = o.Credentials - toSerialize["id"] = o.Id - toSerialize["keyAlgorithm"] = o.KeyAlgorithm - toSerialize["keyOrigin"] = o.KeyOrigin - toSerialize["keyType"] = o.KeyType - toSerialize["publicKey"] = o.PublicKey - if !IsNil(o.ValidUntil) { - toSerialize["validUntil"] = o.ValidUntil - } - return toSerialize, nil -} - -type NullableCreateServiceAccountKeyResponse struct { - value *CreateServiceAccountKeyResponse - isSet bool -} - -func (v NullableCreateServiceAccountKeyResponse) Get() *CreateServiceAccountKeyResponse { - return v.value -} - -func (v *NullableCreateServiceAccountKeyResponse) Set(val *CreateServiceAccountKeyResponse) { - v.value = val - v.isSet = true -} - -func (v NullableCreateServiceAccountKeyResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateServiceAccountKeyResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateServiceAccountKeyResponse(val *CreateServiceAccountKeyResponse) *NullableCreateServiceAccountKeyResponse { - return &NullableCreateServiceAccountKeyResponse{value: val, isSet: true} -} - -func (v NullableCreateServiceAccountKeyResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateServiceAccountKeyResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/serviceaccount/model_create_service_account_key_response_credentials.go b/services/serviceaccount/model_create_service_account_key_response_credentials.go index 752dd6416..55de7dcc9 100644 --- a/services/serviceaccount/model_create_service_account_key_response_credentials.go +++ b/services/serviceaccount/model_create_service_account_key_response_credentials.go @@ -10,13 +10,6 @@ API version: 2.0 package serviceaccount -import ( - "encoding/json" -) - -// checks if the CreateServiceAccountKeyResponseCredentials type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateServiceAccountKeyResponseCredentials{} - // CreateServiceAccountKeyResponseCredentials struct for CreateServiceAccountKeyResponseCredentials type CreateServiceAccountKeyResponseCredentials struct { // Audience - service account API URL @@ -34,202 +27,3 @@ type CreateServiceAccountKeyResponseCredentials struct { // REQUIRED Sub *string `json:"sub"` } - -type _CreateServiceAccountKeyResponseCredentials CreateServiceAccountKeyResponseCredentials - -// NewCreateServiceAccountKeyResponseCredentials instantiates a new CreateServiceAccountKeyResponseCredentials object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreateServiceAccountKeyResponseCredentials(aud *string, iss *string, kid *string, sub *string) *CreateServiceAccountKeyResponseCredentials { - this := CreateServiceAccountKeyResponseCredentials{} - this.Aud = aud - this.Iss = iss - this.Kid = kid - this.Sub = sub - return &this -} - -// NewCreateServiceAccountKeyResponseCredentialsWithDefaults instantiates a new CreateServiceAccountKeyResponseCredentials object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateServiceAccountKeyResponseCredentialsWithDefaults() *CreateServiceAccountKeyResponseCredentials { - this := CreateServiceAccountKeyResponseCredentials{} - return &this -} - -// GetAud returns the Aud field value -func (o *CreateServiceAccountKeyResponseCredentials) GetAud() *string { - if o == nil { - var ret *string - return ret - } - - return o.Aud -} - -// GetAudOk returns a tuple with the Aud field value -// and a boolean to check if the value has been set. -func (o *CreateServiceAccountKeyResponseCredentials) GetAudOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Aud, true -} - -// SetAud sets field value -func (o *CreateServiceAccountKeyResponseCredentials) SetAud(v *string) { - o.Aud = v -} - -// GetIss returns the Iss field value -func (o *CreateServiceAccountKeyResponseCredentials) GetIss() *string { - if o == nil { - var ret *string - return ret - } - - return o.Iss -} - -// GetIssOk returns a tuple with the Iss field value -// and a boolean to check if the value has been set. -func (o *CreateServiceAccountKeyResponseCredentials) GetIssOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Iss, true -} - -// SetIss sets field value -func (o *CreateServiceAccountKeyResponseCredentials) SetIss(v *string) { - o.Iss = v -} - -// GetKid returns the Kid field value -func (o *CreateServiceAccountKeyResponseCredentials) GetKid() *string { - if o == nil { - var ret *string - return ret - } - - return o.Kid -} - -// GetKidOk returns a tuple with the Kid field value -// and a boolean to check if the value has been set. -func (o *CreateServiceAccountKeyResponseCredentials) GetKidOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Kid, true -} - -// SetKid sets field value -func (o *CreateServiceAccountKeyResponseCredentials) SetKid(v *string) { - o.Kid = v -} - -// GetPrivateKey returns the PrivateKey field value if set, zero value otherwise. -func (o *CreateServiceAccountKeyResponseCredentials) GetPrivateKey() *string { - if o == nil || IsNil(o.PrivateKey) { - var ret *string - return ret - } - return o.PrivateKey -} - -// GetPrivateKeyOk returns a tuple with the PrivateKey field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateServiceAccountKeyResponseCredentials) GetPrivateKeyOk() (*string, bool) { - if o == nil || IsNil(o.PrivateKey) { - return nil, false - } - return o.PrivateKey, true -} - -// HasPrivateKey returns a boolean if a field has been set. -func (o *CreateServiceAccountKeyResponseCredentials) HasPrivateKey() bool { - if o != nil && !IsNil(o.PrivateKey) { - return true - } - - return false -} - -// SetPrivateKey gets a reference to the given string and assigns it to the PrivateKey field. -func (o *CreateServiceAccountKeyResponseCredentials) SetPrivateKey(v *string) { - o.PrivateKey = v -} - -// GetSub returns the Sub field value -func (o *CreateServiceAccountKeyResponseCredentials) GetSub() *string { - if o == nil { - var ret *string - return ret - } - - return o.Sub -} - -// GetSubOk returns a tuple with the Sub field value -// and a boolean to check if the value has been set. -func (o *CreateServiceAccountKeyResponseCredentials) GetSubOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Sub, true -} - -// SetSub sets field value -func (o *CreateServiceAccountKeyResponseCredentials) SetSub(v *string) { - o.Sub = v -} - -func (o CreateServiceAccountKeyResponseCredentials) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["aud"] = o.Aud - toSerialize["iss"] = o.Iss - toSerialize["kid"] = o.Kid - if !IsNil(o.PrivateKey) { - toSerialize["privateKey"] = o.PrivateKey - } - toSerialize["sub"] = o.Sub - return toSerialize, nil -} - -type NullableCreateServiceAccountKeyResponseCredentials struct { - value *CreateServiceAccountKeyResponseCredentials - isSet bool -} - -func (v NullableCreateServiceAccountKeyResponseCredentials) Get() *CreateServiceAccountKeyResponseCredentials { - return v.value -} - -func (v *NullableCreateServiceAccountKeyResponseCredentials) Set(val *CreateServiceAccountKeyResponseCredentials) { - v.value = val - v.isSet = true -} - -func (v NullableCreateServiceAccountKeyResponseCredentials) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateServiceAccountKeyResponseCredentials) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateServiceAccountKeyResponseCredentials(val *CreateServiceAccountKeyResponseCredentials) *NullableCreateServiceAccountKeyResponseCredentials { - return &NullableCreateServiceAccountKeyResponseCredentials{value: val, isSet: true} -} - -func (v NullableCreateServiceAccountKeyResponseCredentials) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateServiceAccountKeyResponseCredentials) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/serviceaccount/model_create_service_account_payload.go b/services/serviceaccount/model_create_service_account_payload.go index 2f4977372..8d2336865 100644 --- a/services/serviceaccount/model_create_service_account_payload.go +++ b/services/serviceaccount/model_create_service_account_payload.go @@ -10,102 +10,9 @@ API version: 2.0 package serviceaccount -import ( - "encoding/json" -) - -// checks if the CreateServiceAccountPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateServiceAccountPayload{} - // CreateServiceAccountPayload struct for CreateServiceAccountPayload type CreateServiceAccountPayload struct { // The requested name of the service account. The service will generate a unique email from this name. // REQUIRED Name *string `json:"name"` } - -type _CreateServiceAccountPayload CreateServiceAccountPayload - -// NewCreateServiceAccountPayload instantiates a new CreateServiceAccountPayload object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreateServiceAccountPayload(name *string) *CreateServiceAccountPayload { - this := CreateServiceAccountPayload{} - this.Name = name - return &this -} - -// NewCreateServiceAccountPayloadWithDefaults instantiates a new CreateServiceAccountPayload object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateServiceAccountPayloadWithDefaults() *CreateServiceAccountPayload { - this := CreateServiceAccountPayload{} - return &this -} - -// GetName returns the Name field value -func (o *CreateServiceAccountPayload) GetName() *string { - if o == nil { - var ret *string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CreateServiceAccountPayload) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Name, true -} - -// SetName sets field value -func (o *CreateServiceAccountPayload) SetName(v *string) { - o.Name = v -} - -func (o CreateServiceAccountPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["name"] = o.Name - return toSerialize, nil -} - -type NullableCreateServiceAccountPayload struct { - value *CreateServiceAccountPayload - isSet bool -} - -func (v NullableCreateServiceAccountPayload) Get() *CreateServiceAccountPayload { - return v.value -} - -func (v *NullableCreateServiceAccountPayload) Set(val *CreateServiceAccountPayload) { - v.value = val - v.isSet = true -} - -func (v NullableCreateServiceAccountPayload) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateServiceAccountPayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateServiceAccountPayload(val *CreateServiceAccountPayload) *NullableCreateServiceAccountPayload { - return &NullableCreateServiceAccountPayload{value: val, isSet: true} -} - -func (v NullableCreateServiceAccountPayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateServiceAccountPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/serviceaccount/model_create_short_lived_access_token_response.go b/services/serviceaccount/model_create_short_lived_access_token_response.go index 3b39e93ad..25d1ac4a4 100644 --- a/services/serviceaccount/model_create_short_lived_access_token_response.go +++ b/services/serviceaccount/model_create_short_lived_access_token_response.go @@ -10,13 +10,6 @@ API version: 2.0 package serviceaccount -import ( - "encoding/json" -) - -// checks if the CreateShortLivedAccessTokenResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateShortLivedAccessTokenResponse{} - // CreateShortLivedAccessTokenResponse struct for CreateShortLivedAccessTokenResponse type CreateShortLivedAccessTokenResponse struct { // The short lived token that can be used for API access @@ -33,193 +26,3 @@ type CreateShortLivedAccessTokenResponse struct { // REQUIRED TokenType *string `json:"token_type"` } - -type _CreateShortLivedAccessTokenResponse CreateShortLivedAccessTokenResponse - -// NewCreateShortLivedAccessTokenResponse instantiates a new CreateShortLivedAccessTokenResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCreateShortLivedAccessTokenResponse(accessToken *string, expiresIn *int64, refreshToken *string, scope *string, tokenType *string) *CreateShortLivedAccessTokenResponse { - this := CreateShortLivedAccessTokenResponse{} - this.AccessToken = accessToken - this.ExpiresIn = expiresIn - this.RefreshToken = refreshToken - this.Scope = scope - this.TokenType = tokenType - return &this -} - -// NewCreateShortLivedAccessTokenResponseWithDefaults instantiates a new CreateShortLivedAccessTokenResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCreateShortLivedAccessTokenResponseWithDefaults() *CreateShortLivedAccessTokenResponse { - this := CreateShortLivedAccessTokenResponse{} - return &this -} - -// GetAccessToken returns the AccessToken field value -func (o *CreateShortLivedAccessTokenResponse) GetAccessToken() *string { - if o == nil { - var ret *string - return ret - } - - return o.AccessToken -} - -// GetAccessTokenOk returns a tuple with the AccessToken field value -// and a boolean to check if the value has been set. -func (o *CreateShortLivedAccessTokenResponse) GetAccessTokenOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.AccessToken, true -} - -// SetAccessToken sets field value -func (o *CreateShortLivedAccessTokenResponse) SetAccessToken(v *string) { - o.AccessToken = v -} - -// GetExpiresIn returns the ExpiresIn field value -func (o *CreateShortLivedAccessTokenResponse) GetExpiresIn() *int64 { - if o == nil { - var ret *int64 - return ret - } - - return o.ExpiresIn -} - -// GetExpiresInOk returns a tuple with the ExpiresIn field value -// and a boolean to check if the value has been set. -func (o *CreateShortLivedAccessTokenResponse) GetExpiresInOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.ExpiresIn, true -} - -// SetExpiresIn sets field value -func (o *CreateShortLivedAccessTokenResponse) SetExpiresIn(v *int64) { - o.ExpiresIn = v -} - -// GetRefreshToken returns the RefreshToken field value -func (o *CreateShortLivedAccessTokenResponse) GetRefreshToken() *string { - if o == nil { - var ret *string - return ret - } - - return o.RefreshToken -} - -// GetRefreshTokenOk returns a tuple with the RefreshToken field value -// and a boolean to check if the value has been set. -func (o *CreateShortLivedAccessTokenResponse) GetRefreshTokenOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.RefreshToken, true -} - -// SetRefreshToken sets field value -func (o *CreateShortLivedAccessTokenResponse) SetRefreshToken(v *string) { - o.RefreshToken = v -} - -// GetScope returns the Scope field value -func (o *CreateShortLivedAccessTokenResponse) GetScope() *string { - if o == nil { - var ret *string - return ret - } - - return o.Scope -} - -// GetScopeOk returns a tuple with the Scope field value -// and a boolean to check if the value has been set. -func (o *CreateShortLivedAccessTokenResponse) GetScopeOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Scope, true -} - -// SetScope sets field value -func (o *CreateShortLivedAccessTokenResponse) SetScope(v *string) { - o.Scope = v -} - -// GetTokenType returns the TokenType field value -func (o *CreateShortLivedAccessTokenResponse) GetTokenType() *string { - if o == nil { - var ret *string - return ret - } - - return o.TokenType -} - -// GetTokenTypeOk returns a tuple with the TokenType field value -// and a boolean to check if the value has been set. -func (o *CreateShortLivedAccessTokenResponse) GetTokenTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.TokenType, true -} - -// SetTokenType sets field value -func (o *CreateShortLivedAccessTokenResponse) SetTokenType(v *string) { - o.TokenType = v -} - -func (o CreateShortLivedAccessTokenResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["access_token"] = o.AccessToken - toSerialize["expires_in"] = o.ExpiresIn - toSerialize["refresh_token"] = o.RefreshToken - toSerialize["scope"] = o.Scope - toSerialize["token_type"] = o.TokenType - return toSerialize, nil -} - -type NullableCreateShortLivedAccessTokenResponse struct { - value *CreateShortLivedAccessTokenResponse - isSet bool -} - -func (v NullableCreateShortLivedAccessTokenResponse) Get() *CreateShortLivedAccessTokenResponse { - return v.value -} - -func (v *NullableCreateShortLivedAccessTokenResponse) Set(val *CreateShortLivedAccessTokenResponse) { - v.value = val - v.isSet = true -} - -func (v NullableCreateShortLivedAccessTokenResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateShortLivedAccessTokenResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateShortLivedAccessTokenResponse(val *CreateShortLivedAccessTokenResponse) *NullableCreateShortLivedAccessTokenResponse { - return &NullableCreateShortLivedAccessTokenResponse{value: val, isSet: true} -} - -func (v NullableCreateShortLivedAccessTokenResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateShortLivedAccessTokenResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/serviceaccount/model_error.go b/services/serviceaccount/model_error.go index dce3b1302..72a15bcae 100644 --- a/services/serviceaccount/model_error.go +++ b/services/serviceaccount/model_error.go @@ -11,13 +11,9 @@ API version: 2.0 package serviceaccount import ( - "encoding/json" "time" ) -// checks if the Error type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Error{} - // Error Contains error information. type Error struct { // REQUIRED @@ -31,193 +27,3 @@ type Error struct { // REQUIRED TimeStamp *time.Time `json:"timeStamp"` } - -type _Error Error - -// NewError instantiates a new Error object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewError(error_ *string, message *string, path *string, status *int64, timeStamp *time.Time) *Error { - this := Error{} - this.Error = error_ - this.Message = message - this.Path = path - this.Status = status - this.TimeStamp = timeStamp - return &this -} - -// NewErrorWithDefaults instantiates a new Error object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewErrorWithDefaults() *Error { - this := Error{} - return &this -} - -// GetError returns the Error field value -func (o *Error) GetError() *string { - if o == nil { - var ret *string - return ret - } - - return o.Error -} - -// GetErrorOk returns a tuple with the Error field value -// and a boolean to check if the value has been set. -func (o *Error) GetErrorOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Error, true -} - -// SetError sets field value -func (o *Error) SetError(v *string) { - o.Error = v -} - -// GetMessage returns the Message field value -func (o *Error) GetMessage() *string { - if o == nil { - var ret *string - return ret - } - - return o.Message -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *Error) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Message, true -} - -// SetMessage sets field value -func (o *Error) SetMessage(v *string) { - o.Message = v -} - -// GetPath returns the Path field value -func (o *Error) GetPath() *string { - if o == nil { - var ret *string - return ret - } - - return o.Path -} - -// GetPathOk returns a tuple with the Path field value -// and a boolean to check if the value has been set. -func (o *Error) GetPathOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Path, true -} - -// SetPath sets field value -func (o *Error) SetPath(v *string) { - o.Path = v -} - -// GetStatus returns the Status field value -func (o *Error) GetStatus() *int64 { - if o == nil { - var ret *int64 - return ret - } - - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -func (o *Error) GetStatusOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.Status, true -} - -// SetStatus sets field value -func (o *Error) SetStatus(v *int64) { - o.Status = v -} - -// GetTimeStamp returns the TimeStamp field value -func (o *Error) GetTimeStamp() *time.Time { - if o == nil { - var ret *time.Time - return ret - } - - return o.TimeStamp -} - -// GetTimeStampOk returns a tuple with the TimeStamp field value -// and a boolean to check if the value has been set. -func (o *Error) GetTimeStampOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.TimeStamp, true -} - -// SetTimeStamp sets field value -func (o *Error) SetTimeStamp(v *time.Time) { - o.TimeStamp = v -} - -func (o Error) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["error"] = o.Error - toSerialize["message"] = o.Message - toSerialize["path"] = o.Path - toSerialize["status"] = o.Status - toSerialize["timeStamp"] = o.TimeStamp - return toSerialize, nil -} - -type NullableError struct { - value *Error - isSet bool -} - -func (v NullableError) Get() *Error { - return v.value -} - -func (v *NullableError) Set(val *Error) { - v.value = val - v.isSet = true -} - -func (v NullableError) IsSet() bool { - return v.isSet -} - -func (v *NullableError) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableError(val *Error) *NullableError { - return &NullableError{value: val, isSet: true} -} - -func (v NullableError) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableError) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/serviceaccount/model_get_service_account_key_response.go b/services/serviceaccount/model_get_service_account_key_response.go index 1cf85d273..5d4739529 100644 --- a/services/serviceaccount/model_get_service_account_key_response.go +++ b/services/serviceaccount/model_get_service_account_key_response.go @@ -11,13 +11,9 @@ API version: 2.0 package serviceaccount import ( - "encoding/json" "time" ) -// checks if the GetServiceAccountKeyResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetServiceAccountKeyResponse{} - // GetServiceAccountKeyResponse struct for GetServiceAccountKeyResponse type GetServiceAccountKeyResponse struct { // REQUIRED @@ -41,315 +37,3 @@ type GetServiceAccountKeyResponse struct { // If specified, the timestamp until the key is active. May be null ValidUntil *time.Time `json:"validUntil,omitempty"` } - -type _GetServiceAccountKeyResponse GetServiceAccountKeyResponse - -// NewGetServiceAccountKeyResponse instantiates a new GetServiceAccountKeyResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetServiceAccountKeyResponse(active *bool, createdAt *time.Time, credentials *GetServiceAccountKeyResponseCredentials, id *string, keyAlgorithm *string, keyOrigin *string, keyType *string) *GetServiceAccountKeyResponse { - this := GetServiceAccountKeyResponse{} - this.Active = active - this.CreatedAt = createdAt - this.Credentials = credentials - this.Id = id - this.KeyAlgorithm = keyAlgorithm - this.KeyOrigin = keyOrigin - this.KeyType = keyType - return &this -} - -// NewGetServiceAccountKeyResponseWithDefaults instantiates a new GetServiceAccountKeyResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetServiceAccountKeyResponseWithDefaults() *GetServiceAccountKeyResponse { - this := GetServiceAccountKeyResponse{} - return &this -} - -// GetActive returns the Active field value -func (o *GetServiceAccountKeyResponse) GetActive() *bool { - if o == nil { - var ret *bool - return ret - } - - return o.Active -} - -// GetActiveOk returns a tuple with the Active field value -// and a boolean to check if the value has been set. -func (o *GetServiceAccountKeyResponse) GetActiveOk() (*bool, bool) { - if o == nil { - return nil, false - } - return o.Active, true -} - -// SetActive sets field value -func (o *GetServiceAccountKeyResponse) SetActive(v *bool) { - o.Active = v -} - -// GetCreatedAt returns the CreatedAt field value -func (o *GetServiceAccountKeyResponse) GetCreatedAt() *time.Time { - if o == nil { - var ret *time.Time - return ret - } - - return o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value -// and a boolean to check if the value has been set. -func (o *GetServiceAccountKeyResponse) GetCreatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.CreatedAt, true -} - -// SetCreatedAt sets field value -func (o *GetServiceAccountKeyResponse) SetCreatedAt(v *time.Time) { - o.CreatedAt = v -} - -// GetCredentials returns the Credentials field value -func (o *GetServiceAccountKeyResponse) GetCredentials() *GetServiceAccountKeyResponseCredentials { - if o == nil { - var ret *GetServiceAccountKeyResponseCredentials - return ret - } - - return o.Credentials -} - -// GetCredentialsOk returns a tuple with the Credentials field value -// and a boolean to check if the value has been set. -func (o *GetServiceAccountKeyResponse) GetCredentialsOk() (*GetServiceAccountKeyResponseCredentials, bool) { - if o == nil { - return nil, false - } - return o.Credentials, true -} - -// SetCredentials sets field value -func (o *GetServiceAccountKeyResponse) SetCredentials(v *GetServiceAccountKeyResponseCredentials) { - o.Credentials = v -} - -// GetId returns the Id field value -func (o *GetServiceAccountKeyResponse) GetId() *string { - if o == nil { - var ret *string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *GetServiceAccountKeyResponse) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Id, true -} - -// SetId sets field value -func (o *GetServiceAccountKeyResponse) SetId(v *string) { - o.Id = v -} - -// GetKeyAlgorithm returns the KeyAlgorithm field value -func (o *GetServiceAccountKeyResponse) GetKeyAlgorithm() *string { - if o == nil { - var ret *string - return ret - } - - return o.KeyAlgorithm -} - -// GetKeyAlgorithmOk returns a tuple with the KeyAlgorithm field value -// and a boolean to check if the value has been set. -func (o *GetServiceAccountKeyResponse) GetKeyAlgorithmOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.KeyAlgorithm, true -} - -// SetKeyAlgorithm sets field value -func (o *GetServiceAccountKeyResponse) SetKeyAlgorithm(v *string) { - o.KeyAlgorithm = v -} - -// GetKeyOrigin returns the KeyOrigin field value -func (o *GetServiceAccountKeyResponse) GetKeyOrigin() *string { - if o == nil { - var ret *string - return ret - } - - return o.KeyOrigin -} - -// GetKeyOriginOk returns a tuple with the KeyOrigin field value -// and a boolean to check if the value has been set. -func (o *GetServiceAccountKeyResponse) GetKeyOriginOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.KeyOrigin, true -} - -// SetKeyOrigin sets field value -func (o *GetServiceAccountKeyResponse) SetKeyOrigin(v *string) { - o.KeyOrigin = v -} - -// GetKeyType returns the KeyType field value -func (o *GetServiceAccountKeyResponse) GetKeyType() *string { - if o == nil { - var ret *string - return ret - } - - return o.KeyType -} - -// GetKeyTypeOk returns a tuple with the KeyType field value -// and a boolean to check if the value has been set. -func (o *GetServiceAccountKeyResponse) GetKeyTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.KeyType, true -} - -// SetKeyType sets field value -func (o *GetServiceAccountKeyResponse) SetKeyType(v *string) { - o.KeyType = v -} - -// GetPublicKey returns the PublicKey field value if set, zero value otherwise. -func (o *GetServiceAccountKeyResponse) GetPublicKey() *string { - if o == nil || IsNil(o.PublicKey) { - var ret *string - return ret - } - return o.PublicKey -} - -// GetPublicKeyOk returns a tuple with the PublicKey field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetServiceAccountKeyResponse) GetPublicKeyOk() (*string, bool) { - if o == nil || IsNil(o.PublicKey) { - return nil, false - } - return o.PublicKey, true -} - -// HasPublicKey returns a boolean if a field has been set. -func (o *GetServiceAccountKeyResponse) HasPublicKey() bool { - if o != nil && !IsNil(o.PublicKey) { - return true - } - - return false -} - -// SetPublicKey gets a reference to the given string and assigns it to the PublicKey field. -func (o *GetServiceAccountKeyResponse) SetPublicKey(v *string) { - o.PublicKey = v -} - -// GetValidUntil returns the ValidUntil field value if set, zero value otherwise. -func (o *GetServiceAccountKeyResponse) GetValidUntil() *time.Time { - if o == nil || IsNil(o.ValidUntil) { - var ret *time.Time - return ret - } - return o.ValidUntil -} - -// GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetServiceAccountKeyResponse) GetValidUntilOk() (*time.Time, bool) { - if o == nil || IsNil(o.ValidUntil) { - return nil, false - } - return o.ValidUntil, true -} - -// HasValidUntil returns a boolean if a field has been set. -func (o *GetServiceAccountKeyResponse) HasValidUntil() bool { - if o != nil && !IsNil(o.ValidUntil) { - return true - } - - return false -} - -// SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. -func (o *GetServiceAccountKeyResponse) SetValidUntil(v *time.Time) { - o.ValidUntil = v -} - -func (o GetServiceAccountKeyResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["active"] = o.Active - toSerialize["createdAt"] = o.CreatedAt - toSerialize["credentials"] = o.Credentials - toSerialize["id"] = o.Id - toSerialize["keyAlgorithm"] = o.KeyAlgorithm - toSerialize["keyOrigin"] = o.KeyOrigin - toSerialize["keyType"] = o.KeyType - if !IsNil(o.PublicKey) { - toSerialize["publicKey"] = o.PublicKey - } - if !IsNil(o.ValidUntil) { - toSerialize["validUntil"] = o.ValidUntil - } - return toSerialize, nil -} - -type NullableGetServiceAccountKeyResponse struct { - value *GetServiceAccountKeyResponse - isSet bool -} - -func (v NullableGetServiceAccountKeyResponse) Get() *GetServiceAccountKeyResponse { - return v.value -} - -func (v *NullableGetServiceAccountKeyResponse) Set(val *GetServiceAccountKeyResponse) { - v.value = val - v.isSet = true -} - -func (v NullableGetServiceAccountKeyResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableGetServiceAccountKeyResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetServiceAccountKeyResponse(val *GetServiceAccountKeyResponse) *NullableGetServiceAccountKeyResponse { - return &NullableGetServiceAccountKeyResponse{value: val, isSet: true} -} - -func (v NullableGetServiceAccountKeyResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetServiceAccountKeyResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/serviceaccount/model_get_service_account_key_response_credentials.go b/services/serviceaccount/model_get_service_account_key_response_credentials.go index d6274d246..c2f276f97 100644 --- a/services/serviceaccount/model_get_service_account_key_response_credentials.go +++ b/services/serviceaccount/model_get_service_account_key_response_credentials.go @@ -10,13 +10,6 @@ API version: 2.0 package serviceaccount -import ( - "encoding/json" -) - -// checks if the GetServiceAccountKeyResponseCredentials type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetServiceAccountKeyResponseCredentials{} - // GetServiceAccountKeyResponseCredentials struct for GetServiceAccountKeyResponseCredentials type GetServiceAccountKeyResponseCredentials struct { // Audience - service account API URL @@ -32,167 +25,3 @@ type GetServiceAccountKeyResponseCredentials struct { // REQUIRED Sub *string `json:"sub"` } - -type _GetServiceAccountKeyResponseCredentials GetServiceAccountKeyResponseCredentials - -// NewGetServiceAccountKeyResponseCredentials instantiates a new GetServiceAccountKeyResponseCredentials object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGetServiceAccountKeyResponseCredentials(aud *string, iss *string, kid *string, sub *string) *GetServiceAccountKeyResponseCredentials { - this := GetServiceAccountKeyResponseCredentials{} - this.Aud = aud - this.Iss = iss - this.Kid = kid - this.Sub = sub - return &this -} - -// NewGetServiceAccountKeyResponseCredentialsWithDefaults instantiates a new GetServiceAccountKeyResponseCredentials object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGetServiceAccountKeyResponseCredentialsWithDefaults() *GetServiceAccountKeyResponseCredentials { - this := GetServiceAccountKeyResponseCredentials{} - return &this -} - -// GetAud returns the Aud field value -func (o *GetServiceAccountKeyResponseCredentials) GetAud() *string { - if o == nil { - var ret *string - return ret - } - - return o.Aud -} - -// GetAudOk returns a tuple with the Aud field value -// and a boolean to check if the value has been set. -func (o *GetServiceAccountKeyResponseCredentials) GetAudOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Aud, true -} - -// SetAud sets field value -func (o *GetServiceAccountKeyResponseCredentials) SetAud(v *string) { - o.Aud = v -} - -// GetIss returns the Iss field value -func (o *GetServiceAccountKeyResponseCredentials) GetIss() *string { - if o == nil { - var ret *string - return ret - } - - return o.Iss -} - -// GetIssOk returns a tuple with the Iss field value -// and a boolean to check if the value has been set. -func (o *GetServiceAccountKeyResponseCredentials) GetIssOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Iss, true -} - -// SetIss sets field value -func (o *GetServiceAccountKeyResponseCredentials) SetIss(v *string) { - o.Iss = v -} - -// GetKid returns the Kid field value -func (o *GetServiceAccountKeyResponseCredentials) GetKid() *string { - if o == nil { - var ret *string - return ret - } - - return o.Kid -} - -// GetKidOk returns a tuple with the Kid field value -// and a boolean to check if the value has been set. -func (o *GetServiceAccountKeyResponseCredentials) GetKidOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Kid, true -} - -// SetKid sets field value -func (o *GetServiceAccountKeyResponseCredentials) SetKid(v *string) { - o.Kid = v -} - -// GetSub returns the Sub field value -func (o *GetServiceAccountKeyResponseCredentials) GetSub() *string { - if o == nil { - var ret *string - return ret - } - - return o.Sub -} - -// GetSubOk returns a tuple with the Sub field value -// and a boolean to check if the value has been set. -func (o *GetServiceAccountKeyResponseCredentials) GetSubOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Sub, true -} - -// SetSub sets field value -func (o *GetServiceAccountKeyResponseCredentials) SetSub(v *string) { - o.Sub = v -} - -func (o GetServiceAccountKeyResponseCredentials) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["aud"] = o.Aud - toSerialize["iss"] = o.Iss - toSerialize["kid"] = o.Kid - toSerialize["sub"] = o.Sub - return toSerialize, nil -} - -type NullableGetServiceAccountKeyResponseCredentials struct { - value *GetServiceAccountKeyResponseCredentials - isSet bool -} - -func (v NullableGetServiceAccountKeyResponseCredentials) Get() *GetServiceAccountKeyResponseCredentials { - return v.value -} - -func (v *NullableGetServiceAccountKeyResponseCredentials) Set(val *GetServiceAccountKeyResponseCredentials) { - v.value = val - v.isSet = true -} - -func (v NullableGetServiceAccountKeyResponseCredentials) IsSet() bool { - return v.isSet -} - -func (v *NullableGetServiceAccountKeyResponseCredentials) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetServiceAccountKeyResponseCredentials(val *GetServiceAccountKeyResponseCredentials) *NullableGetServiceAccountKeyResponseCredentials { - return &NullableGetServiceAccountKeyResponseCredentials{value: val, isSet: true} -} - -func (v NullableGetServiceAccountKeyResponseCredentials) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetServiceAccountKeyResponseCredentials) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/serviceaccount/model_jwk.go b/services/serviceaccount/model_jwk.go index c976ed85e..ab39d5166 100644 --- a/services/serviceaccount/model_jwk.go +++ b/services/serviceaccount/model_jwk.go @@ -10,13 +10,6 @@ API version: 2.0 package serviceaccount -import ( - "encoding/json" -) - -// checks if the JWK type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &JWK{} - // JWK JSON Web Key according to https://datatracker.ietf.org/doc/html/rfc7517#section-4 type JWK struct { Alg *string `json:"alg,omitempty"` @@ -33,430 +26,3 @@ type JWK struct { X5t256 *string `json:"x5t256,omitempty"` X5u *string `json:"x5u,omitempty"` } - -type _JWK JWK - -// NewJWK instantiates a new JWK object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewJWK(e *string, n *string) *JWK { - this := JWK{} - this.E = e - this.N = n - return &this -} - -// NewJWKWithDefaults instantiates a new JWK object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewJWKWithDefaults() *JWK { - this := JWK{} - return &this -} - -// GetAlg returns the Alg field value if set, zero value otherwise. -func (o *JWK) GetAlg() *string { - if o == nil || IsNil(o.Alg) { - var ret *string - return ret - } - return o.Alg -} - -// GetAlgOk returns a tuple with the Alg field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *JWK) GetAlgOk() (*string, bool) { - if o == nil || IsNil(o.Alg) { - return nil, false - } - return o.Alg, true -} - -// HasAlg returns a boolean if a field has been set. -func (o *JWK) HasAlg() bool { - if o != nil && !IsNil(o.Alg) { - return true - } - - return false -} - -// SetAlg gets a reference to the given string and assigns it to the Alg field. -func (o *JWK) SetAlg(v *string) { - o.Alg = v -} - -// GetE returns the E field value -func (o *JWK) GetE() *string { - if o == nil { - var ret *string - return ret - } - - return o.E -} - -// GetEOk returns a tuple with the E field value -// and a boolean to check if the value has been set. -func (o *JWK) GetEOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.E, true -} - -// SetE sets field value -func (o *JWK) SetE(v *string) { - o.E = v -} - -// GetKid returns the Kid field value if set, zero value otherwise. -func (o *JWK) GetKid() *string { - if o == nil || IsNil(o.Kid) { - var ret *string - return ret - } - return o.Kid -} - -// GetKidOk returns a tuple with the Kid field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *JWK) GetKidOk() (*string, bool) { - if o == nil || IsNil(o.Kid) { - return nil, false - } - return o.Kid, true -} - -// HasKid returns a boolean if a field has been set. -func (o *JWK) HasKid() bool { - if o != nil && !IsNil(o.Kid) { - return true - } - - return false -} - -// SetKid gets a reference to the given string and assigns it to the Kid field. -func (o *JWK) SetKid(v *string) { - o.Kid = v -} - -// GetKs returns the Ks field value if set, zero value otherwise. -func (o *JWK) GetKs() *string { - if o == nil || IsNil(o.Ks) { - var ret *string - return ret - } - return o.Ks -} - -// GetKsOk returns a tuple with the Ks field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *JWK) GetKsOk() (*string, bool) { - if o == nil || IsNil(o.Ks) { - return nil, false - } - return o.Ks, true -} - -// HasKs returns a boolean if a field has been set. -func (o *JWK) HasKs() bool { - if o != nil && !IsNil(o.Ks) { - return true - } - - return false -} - -// SetKs gets a reference to the given string and assigns it to the Ks field. -func (o *JWK) SetKs(v *string) { - o.Ks = v -} - -// GetN returns the N field value -func (o *JWK) GetN() *string { - if o == nil { - var ret *string - return ret - } - - return o.N -} - -// GetNOk returns a tuple with the N field value -// and a boolean to check if the value has been set. -func (o *JWK) GetNOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.N, true -} - -// SetN sets field value -func (o *JWK) SetN(v *string) { - o.N = v -} - -// GetOps returns the Ops field value if set, zero value otherwise. -func (o *JWK) GetOps() *string { - if o == nil || IsNil(o.Ops) { - var ret *string - return ret - } - return o.Ops -} - -// GetOpsOk returns a tuple with the Ops field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *JWK) GetOpsOk() (*string, bool) { - if o == nil || IsNil(o.Ops) { - return nil, false - } - return o.Ops, true -} - -// HasOps returns a boolean if a field has been set. -func (o *JWK) HasOps() bool { - if o != nil && !IsNil(o.Ops) { - return true - } - - return false -} - -// SetOps gets a reference to the given string and assigns it to the Ops field. -func (o *JWK) SetOps(v *string) { - o.Ops = v -} - -// GetUse returns the Use field value if set, zero value otherwise. -func (o *JWK) GetUse() *string { - if o == nil || IsNil(o.Use) { - var ret *string - return ret - } - return o.Use -} - -// GetUseOk returns a tuple with the Use field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *JWK) GetUseOk() (*string, bool) { - if o == nil || IsNil(o.Use) { - return nil, false - } - return o.Use, true -} - -// HasUse returns a boolean if a field has been set. -func (o *JWK) HasUse() bool { - if o != nil && !IsNil(o.Use) { - return true - } - - return false -} - -// SetUse gets a reference to the given string and assigns it to the Use field. -func (o *JWK) SetUse(v *string) { - o.Use = v -} - -// GetX5c returns the X5c field value if set, zero value otherwise. -func (o *JWK) GetX5c() *string { - if o == nil || IsNil(o.X5c) { - var ret *string - return ret - } - return o.X5c -} - -// GetX5cOk returns a tuple with the X5c field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *JWK) GetX5cOk() (*string, bool) { - if o == nil || IsNil(o.X5c) { - return nil, false - } - return o.X5c, true -} - -// HasX5c returns a boolean if a field has been set. -func (o *JWK) HasX5c() bool { - if o != nil && !IsNil(o.X5c) { - return true - } - - return false -} - -// SetX5c gets a reference to the given string and assigns it to the X5c field. -func (o *JWK) SetX5c(v *string) { - o.X5c = v -} - -// GetX5t returns the X5t field value if set, zero value otherwise. -func (o *JWK) GetX5t() *string { - if o == nil || IsNil(o.X5t) { - var ret *string - return ret - } - return o.X5t -} - -// GetX5tOk returns a tuple with the X5t field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *JWK) GetX5tOk() (*string, bool) { - if o == nil || IsNil(o.X5t) { - return nil, false - } - return o.X5t, true -} - -// HasX5t returns a boolean if a field has been set. -func (o *JWK) HasX5t() bool { - if o != nil && !IsNil(o.X5t) { - return true - } - - return false -} - -// SetX5t gets a reference to the given string and assigns it to the X5t field. -func (o *JWK) SetX5t(v *string) { - o.X5t = v -} - -// GetX5t256 returns the X5t256 field value if set, zero value otherwise. -func (o *JWK) GetX5t256() *string { - if o == nil || IsNil(o.X5t256) { - var ret *string - return ret - } - return o.X5t256 -} - -// GetX5t256Ok returns a tuple with the X5t256 field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *JWK) GetX5t256Ok() (*string, bool) { - if o == nil || IsNil(o.X5t256) { - return nil, false - } - return o.X5t256, true -} - -// HasX5t256 returns a boolean if a field has been set. -func (o *JWK) HasX5t256() bool { - if o != nil && !IsNil(o.X5t256) { - return true - } - - return false -} - -// SetX5t256 gets a reference to the given string and assigns it to the X5t256 field. -func (o *JWK) SetX5t256(v *string) { - o.X5t256 = v -} - -// GetX5u returns the X5u field value if set, zero value otherwise. -func (o *JWK) GetX5u() *string { - if o == nil || IsNil(o.X5u) { - var ret *string - return ret - } - return o.X5u -} - -// GetX5uOk returns a tuple with the X5u field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *JWK) GetX5uOk() (*string, bool) { - if o == nil || IsNil(o.X5u) { - return nil, false - } - return o.X5u, true -} - -// HasX5u returns a boolean if a field has been set. -func (o *JWK) HasX5u() bool { - if o != nil && !IsNil(o.X5u) { - return true - } - - return false -} - -// SetX5u gets a reference to the given string and assigns it to the X5u field. -func (o *JWK) SetX5u(v *string) { - o.X5u = v -} - -func (o JWK) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Alg) { - toSerialize["alg"] = o.Alg - } - toSerialize["e"] = o.E - if !IsNil(o.Kid) { - toSerialize["kid"] = o.Kid - } - if !IsNil(o.Ks) { - toSerialize["ks"] = o.Ks - } - toSerialize["n"] = o.N - if !IsNil(o.Ops) { - toSerialize["ops"] = o.Ops - } - if !IsNil(o.Use) { - toSerialize["use"] = o.Use - } - if !IsNil(o.X5c) { - toSerialize["x5c"] = o.X5c - } - if !IsNil(o.X5t) { - toSerialize["x5t"] = o.X5t - } - if !IsNil(o.X5t256) { - toSerialize["x5t256"] = o.X5t256 - } - if !IsNil(o.X5u) { - toSerialize["x5u"] = o.X5u - } - return toSerialize, nil -} - -type NullableJWK struct { - value *JWK - isSet bool -} - -func (v NullableJWK) Get() *JWK { - return v.value -} - -func (v *NullableJWK) Set(val *JWK) { - v.value = val - v.isSet = true -} - -func (v NullableJWK) IsSet() bool { - return v.isSet -} - -func (v *NullableJWK) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableJWK(val *JWK) *NullableJWK { - return &NullableJWK{value: val, isSet: true} -} - -func (v NullableJWK) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableJWK) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/serviceaccount/model_jwks.go b/services/serviceaccount/model_jwks.go index e3c3901f0..2c30663a1 100644 --- a/services/serviceaccount/model_jwks.go +++ b/services/serviceaccount/model_jwks.go @@ -10,101 +10,8 @@ API version: 2.0 package serviceaccount -import ( - "encoding/json" -) - -// checks if the JWKS type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &JWKS{} - // JWKS struct for JWKS type JWKS struct { // REQUIRED Keys *[]JWK `json:"keys"` } - -type _JWKS JWKS - -// NewJWKS instantiates a new JWKS object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewJWKS(keys *[]JWK) *JWKS { - this := JWKS{} - this.Keys = keys - return &this -} - -// NewJWKSWithDefaults instantiates a new JWKS object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewJWKSWithDefaults() *JWKS { - this := JWKS{} - return &this -} - -// GetKeys returns the Keys field value -func (o *JWKS) GetKeys() *[]JWK { - if o == nil { - var ret *[]JWK - return ret - } - - return o.Keys -} - -// GetKeysOk returns a tuple with the Keys field value -// and a boolean to check if the value has been set. -func (o *JWKS) GetKeysOk() (*[]JWK, bool) { - if o == nil { - return nil, false - } - return o.Keys, true -} - -// SetKeys sets field value -func (o *JWKS) SetKeys(v *[]JWK) { - o.Keys = v -} - -func (o JWKS) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["keys"] = o.Keys - return toSerialize, nil -} - -type NullableJWKS struct { - value *JWKS - isSet bool -} - -func (v NullableJWKS) Get() *JWKS { - return v.value -} - -func (v *NullableJWKS) Set(val *JWKS) { - v.value = val - v.isSet = true -} - -func (v NullableJWKS) IsSet() bool { - return v.isSet -} - -func (v *NullableJWKS) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableJWKS(val *JWKS) *NullableJWKS { - return &NullableJWKS{value: val, isSet: true} -} - -func (v NullableJWKS) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableJWKS) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/serviceaccount/model_list_access_tokens_response.go b/services/serviceaccount/model_list_access_tokens_response.go index 7d889b665..ab69d2ab9 100644 --- a/services/serviceaccount/model_list_access_tokens_response.go +++ b/services/serviceaccount/model_list_access_tokens_response.go @@ -10,107 +10,7 @@ API version: 2.0 package serviceaccount -import ( - "encoding/json" -) - -// checks if the ListAccessTokensResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListAccessTokensResponse{} - // ListAccessTokensResponse struct for ListAccessTokensResponse type ListAccessTokensResponse struct { Items *[]AccessTokenMetadata `json:"items,omitempty"` } - -// NewListAccessTokensResponse instantiates a new ListAccessTokensResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewListAccessTokensResponse() *ListAccessTokensResponse { - this := ListAccessTokensResponse{} - return &this -} - -// NewListAccessTokensResponseWithDefaults instantiates a new ListAccessTokensResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewListAccessTokensResponseWithDefaults() *ListAccessTokensResponse { - this := ListAccessTokensResponse{} - return &this -} - -// GetItems returns the Items field value if set, zero value otherwise. -func (o *ListAccessTokensResponse) GetItems() *[]AccessTokenMetadata { - if o == nil || IsNil(o.Items) { - var ret *[]AccessTokenMetadata - return ret - } - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListAccessTokensResponse) GetItemsOk() (*[]AccessTokenMetadata, bool) { - if o == nil || IsNil(o.Items) { - return nil, false - } - return o.Items, true -} - -// HasItems returns a boolean if a field has been set. -func (o *ListAccessTokensResponse) HasItems() bool { - if o != nil && !IsNil(o.Items) { - return true - } - - return false -} - -// SetItems gets a reference to the given []AccessTokenMetadata and assigns it to the Items field. -func (o *ListAccessTokensResponse) SetItems(v *[]AccessTokenMetadata) { - o.Items = v -} - -func (o ListAccessTokensResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Items) { - toSerialize["items"] = o.Items - } - return toSerialize, nil -} - -type NullableListAccessTokensResponse struct { - value *ListAccessTokensResponse - isSet bool -} - -func (v NullableListAccessTokensResponse) Get() *ListAccessTokensResponse { - return v.value -} - -func (v *NullableListAccessTokensResponse) Set(val *ListAccessTokensResponse) { - v.value = val - v.isSet = true -} - -func (v NullableListAccessTokensResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableListAccessTokensResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListAccessTokensResponse(val *ListAccessTokensResponse) *NullableListAccessTokensResponse { - return &NullableListAccessTokensResponse{value: val, isSet: true} -} - -func (v NullableListAccessTokensResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListAccessTokensResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/serviceaccount/model_list_service_account_keys_response.go b/services/serviceaccount/model_list_service_account_keys_response.go index 925e9887b..1e99252cf 100644 --- a/services/serviceaccount/model_list_service_account_keys_response.go +++ b/services/serviceaccount/model_list_service_account_keys_response.go @@ -10,101 +10,8 @@ API version: 2.0 package serviceaccount -import ( - "encoding/json" -) - -// checks if the ListServiceAccountKeysResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListServiceAccountKeysResponse{} - // ListServiceAccountKeysResponse struct for ListServiceAccountKeysResponse type ListServiceAccountKeysResponse struct { // REQUIRED Items *[]ServiceAccountKeyListResponse `json:"items"` } - -type _ListServiceAccountKeysResponse ListServiceAccountKeysResponse - -// NewListServiceAccountKeysResponse instantiates a new ListServiceAccountKeysResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewListServiceAccountKeysResponse(items *[]ServiceAccountKeyListResponse) *ListServiceAccountKeysResponse { - this := ListServiceAccountKeysResponse{} - this.Items = items - return &this -} - -// NewListServiceAccountKeysResponseWithDefaults instantiates a new ListServiceAccountKeysResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewListServiceAccountKeysResponseWithDefaults() *ListServiceAccountKeysResponse { - this := ListServiceAccountKeysResponse{} - return &this -} - -// GetItems returns the Items field value -func (o *ListServiceAccountKeysResponse) GetItems() *[]ServiceAccountKeyListResponse { - if o == nil { - var ret *[]ServiceAccountKeyListResponse - return ret - } - - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value -// and a boolean to check if the value has been set. -func (o *ListServiceAccountKeysResponse) GetItemsOk() (*[]ServiceAccountKeyListResponse, bool) { - if o == nil { - return nil, false - } - return o.Items, true -} - -// SetItems sets field value -func (o *ListServiceAccountKeysResponse) SetItems(v *[]ServiceAccountKeyListResponse) { - o.Items = v -} - -func (o ListServiceAccountKeysResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["items"] = o.Items - return toSerialize, nil -} - -type NullableListServiceAccountKeysResponse struct { - value *ListServiceAccountKeysResponse - isSet bool -} - -func (v NullableListServiceAccountKeysResponse) Get() *ListServiceAccountKeysResponse { - return v.value -} - -func (v *NullableListServiceAccountKeysResponse) Set(val *ListServiceAccountKeysResponse) { - v.value = val - v.isSet = true -} - -func (v NullableListServiceAccountKeysResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableListServiceAccountKeysResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListServiceAccountKeysResponse(val *ListServiceAccountKeysResponse) *NullableListServiceAccountKeysResponse { - return &NullableListServiceAccountKeysResponse{value: val, isSet: true} -} - -func (v NullableListServiceAccountKeysResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListServiceAccountKeysResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/serviceaccount/model_list_service_accounts_response.go b/services/serviceaccount/model_list_service_accounts_response.go index c1ba34ce4..0657bf895 100644 --- a/services/serviceaccount/model_list_service_accounts_response.go +++ b/services/serviceaccount/model_list_service_accounts_response.go @@ -10,101 +10,8 @@ API version: 2.0 package serviceaccount -import ( - "encoding/json" -) - -// checks if the ListServiceAccountsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListServiceAccountsResponse{} - // ListServiceAccountsResponse struct for ListServiceAccountsResponse type ListServiceAccountsResponse struct { // REQUIRED Items *[]ServiceAccount `json:"items"` } - -type _ListServiceAccountsResponse ListServiceAccountsResponse - -// NewListServiceAccountsResponse instantiates a new ListServiceAccountsResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewListServiceAccountsResponse(items *[]ServiceAccount) *ListServiceAccountsResponse { - this := ListServiceAccountsResponse{} - this.Items = items - return &this -} - -// NewListServiceAccountsResponseWithDefaults instantiates a new ListServiceAccountsResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewListServiceAccountsResponseWithDefaults() *ListServiceAccountsResponse { - this := ListServiceAccountsResponse{} - return &this -} - -// GetItems returns the Items field value -func (o *ListServiceAccountsResponse) GetItems() *[]ServiceAccount { - if o == nil { - var ret *[]ServiceAccount - return ret - } - - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value -// and a boolean to check if the value has been set. -func (o *ListServiceAccountsResponse) GetItemsOk() (*[]ServiceAccount, bool) { - if o == nil { - return nil, false - } - return o.Items, true -} - -// SetItems sets field value -func (o *ListServiceAccountsResponse) SetItems(v *[]ServiceAccount) { - o.Items = v -} - -func (o ListServiceAccountsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["items"] = o.Items - return toSerialize, nil -} - -type NullableListServiceAccountsResponse struct { - value *ListServiceAccountsResponse - isSet bool -} - -func (v NullableListServiceAccountsResponse) Get() *ListServiceAccountsResponse { - return v.value -} - -func (v *NullableListServiceAccountsResponse) Set(val *ListServiceAccountsResponse) { - v.value = val - v.isSet = true -} - -func (v NullableListServiceAccountsResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableListServiceAccountsResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListServiceAccountsResponse(val *ListServiceAccountsResponse) *NullableListServiceAccountsResponse { - return &NullableListServiceAccountsResponse{value: val, isSet: true} -} - -func (v NullableListServiceAccountsResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListServiceAccountsResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/serviceaccount/model_partial_update_service_account_key_payload.go b/services/serviceaccount/model_partial_update_service_account_key_payload.go index cb93b7cfd..ba0037f14 100644 --- a/services/serviceaccount/model_partial_update_service_account_key_payload.go +++ b/services/serviceaccount/model_partial_update_service_account_key_payload.go @@ -11,13 +11,9 @@ API version: 2.0 package serviceaccount import ( - "encoding/json" "time" ) -// checks if the PartialUpdateServiceAccountKeyPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PartialUpdateServiceAccountKeyPayload{} - // PartialUpdateServiceAccountKeyPayload struct for PartialUpdateServiceAccountKeyPayload type PartialUpdateServiceAccountKeyPayload struct { // Active keys are valid, while inactive keys are temporarily deactivated. @@ -25,131 +21,3 @@ type PartialUpdateServiceAccountKeyPayload struct { // Optional, date of key expiration. To disable, set time to \"9999-01-01T01:01:01Z\" ValidUntil *time.Time `json:"validUntil,omitempty"` } - -// NewPartialUpdateServiceAccountKeyPayload instantiates a new PartialUpdateServiceAccountKeyPayload object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPartialUpdateServiceAccountKeyPayload() *PartialUpdateServiceAccountKeyPayload { - this := PartialUpdateServiceAccountKeyPayload{} - return &this -} - -// NewPartialUpdateServiceAccountKeyPayloadWithDefaults instantiates a new PartialUpdateServiceAccountKeyPayload object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPartialUpdateServiceAccountKeyPayloadWithDefaults() *PartialUpdateServiceAccountKeyPayload { - this := PartialUpdateServiceAccountKeyPayload{} - return &this -} - -// GetActive returns the Active field value if set, zero value otherwise. -func (o *PartialUpdateServiceAccountKeyPayload) GetActive() *bool { - if o == nil || IsNil(o.Active) { - var ret *bool - return ret - } - return o.Active -} - -// GetActiveOk returns a tuple with the Active field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PartialUpdateServiceAccountKeyPayload) GetActiveOk() (*bool, bool) { - if o == nil || IsNil(o.Active) { - return nil, false - } - return o.Active, true -} - -// HasActive returns a boolean if a field has been set. -func (o *PartialUpdateServiceAccountKeyPayload) HasActive() bool { - if o != nil && !IsNil(o.Active) { - return true - } - - return false -} - -// SetActive gets a reference to the given bool and assigns it to the Active field. -func (o *PartialUpdateServiceAccountKeyPayload) SetActive(v *bool) { - o.Active = v -} - -// GetValidUntil returns the ValidUntil field value if set, zero value otherwise. -func (o *PartialUpdateServiceAccountKeyPayload) GetValidUntil() *time.Time { - if o == nil || IsNil(o.ValidUntil) { - var ret *time.Time - return ret - } - return o.ValidUntil -} - -// GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PartialUpdateServiceAccountKeyPayload) GetValidUntilOk() (*time.Time, bool) { - if o == nil || IsNil(o.ValidUntil) { - return nil, false - } - return o.ValidUntil, true -} - -// HasValidUntil returns a boolean if a field has been set. -func (o *PartialUpdateServiceAccountKeyPayload) HasValidUntil() bool { - if o != nil && !IsNil(o.ValidUntil) { - return true - } - - return false -} - -// SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. -func (o *PartialUpdateServiceAccountKeyPayload) SetValidUntil(v *time.Time) { - o.ValidUntil = v -} - -func (o PartialUpdateServiceAccountKeyPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Active) { - toSerialize["active"] = o.Active - } - if !IsNil(o.ValidUntil) { - toSerialize["validUntil"] = o.ValidUntil - } - return toSerialize, nil -} - -type NullablePartialUpdateServiceAccountKeyPayload struct { - value *PartialUpdateServiceAccountKeyPayload - isSet bool -} - -func (v NullablePartialUpdateServiceAccountKeyPayload) Get() *PartialUpdateServiceAccountKeyPayload { - return v.value -} - -func (v *NullablePartialUpdateServiceAccountKeyPayload) Set(val *PartialUpdateServiceAccountKeyPayload) { - v.value = val - v.isSet = true -} - -func (v NullablePartialUpdateServiceAccountKeyPayload) IsSet() bool { - return v.isSet -} - -func (v *NullablePartialUpdateServiceAccountKeyPayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePartialUpdateServiceAccountKeyPayload(val *PartialUpdateServiceAccountKeyPayload) *NullablePartialUpdateServiceAccountKeyPayload { - return &NullablePartialUpdateServiceAccountKeyPayload{value: val, isSet: true} -} - -func (v NullablePartialUpdateServiceAccountKeyPayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePartialUpdateServiceAccountKeyPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/serviceaccount/model_partial_update_service_account_key_response.go b/services/serviceaccount/model_partial_update_service_account_key_response.go index e26278efc..9e1420b7b 100644 --- a/services/serviceaccount/model_partial_update_service_account_key_response.go +++ b/services/serviceaccount/model_partial_update_service_account_key_response.go @@ -11,13 +11,9 @@ API version: 2.0 package serviceaccount import ( - "encoding/json" "time" ) -// checks if the PartialUpdateServiceAccountKeyResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PartialUpdateServiceAccountKeyResponse{} - // PartialUpdateServiceAccountKeyResponse struct for PartialUpdateServiceAccountKeyResponse type PartialUpdateServiceAccountKeyResponse struct { // REQUIRED @@ -37,254 +33,3 @@ type PartialUpdateServiceAccountKeyResponse struct { // If specified, the timestamp until the key is active. May be null ValidUntil *time.Time `json:"validUntil,omitempty"` } - -type _PartialUpdateServiceAccountKeyResponse PartialUpdateServiceAccountKeyResponse - -// NewPartialUpdateServiceAccountKeyResponse instantiates a new PartialUpdateServiceAccountKeyResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPartialUpdateServiceAccountKeyResponse(active *bool, createdAt *time.Time, id *string, keyAlgorithm *string, keyOrigin *string, keyType *string) *PartialUpdateServiceAccountKeyResponse { - this := PartialUpdateServiceAccountKeyResponse{} - this.Active = active - this.CreatedAt = createdAt - this.Id = id - this.KeyAlgorithm = keyAlgorithm - this.KeyOrigin = keyOrigin - this.KeyType = keyType - return &this -} - -// NewPartialUpdateServiceAccountKeyResponseWithDefaults instantiates a new PartialUpdateServiceAccountKeyResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPartialUpdateServiceAccountKeyResponseWithDefaults() *PartialUpdateServiceAccountKeyResponse { - this := PartialUpdateServiceAccountKeyResponse{} - return &this -} - -// GetActive returns the Active field value -func (o *PartialUpdateServiceAccountKeyResponse) GetActive() *bool { - if o == nil { - var ret *bool - return ret - } - - return o.Active -} - -// GetActiveOk returns a tuple with the Active field value -// and a boolean to check if the value has been set. -func (o *PartialUpdateServiceAccountKeyResponse) GetActiveOk() (*bool, bool) { - if o == nil { - return nil, false - } - return o.Active, true -} - -// SetActive sets field value -func (o *PartialUpdateServiceAccountKeyResponse) SetActive(v *bool) { - o.Active = v -} - -// GetCreatedAt returns the CreatedAt field value -func (o *PartialUpdateServiceAccountKeyResponse) GetCreatedAt() *time.Time { - if o == nil { - var ret *time.Time - return ret - } - - return o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value -// and a boolean to check if the value has been set. -func (o *PartialUpdateServiceAccountKeyResponse) GetCreatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.CreatedAt, true -} - -// SetCreatedAt sets field value -func (o *PartialUpdateServiceAccountKeyResponse) SetCreatedAt(v *time.Time) { - o.CreatedAt = v -} - -// GetId returns the Id field value -func (o *PartialUpdateServiceAccountKeyResponse) GetId() *string { - if o == nil { - var ret *string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *PartialUpdateServiceAccountKeyResponse) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Id, true -} - -// SetId sets field value -func (o *PartialUpdateServiceAccountKeyResponse) SetId(v *string) { - o.Id = v -} - -// GetKeyAlgorithm returns the KeyAlgorithm field value -func (o *PartialUpdateServiceAccountKeyResponse) GetKeyAlgorithm() *string { - if o == nil { - var ret *string - return ret - } - - return o.KeyAlgorithm -} - -// GetKeyAlgorithmOk returns a tuple with the KeyAlgorithm field value -// and a boolean to check if the value has been set. -func (o *PartialUpdateServiceAccountKeyResponse) GetKeyAlgorithmOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.KeyAlgorithm, true -} - -// SetKeyAlgorithm sets field value -func (o *PartialUpdateServiceAccountKeyResponse) SetKeyAlgorithm(v *string) { - o.KeyAlgorithm = v -} - -// GetKeyOrigin returns the KeyOrigin field value -func (o *PartialUpdateServiceAccountKeyResponse) GetKeyOrigin() *string { - if o == nil { - var ret *string - return ret - } - - return o.KeyOrigin -} - -// GetKeyOriginOk returns a tuple with the KeyOrigin field value -// and a boolean to check if the value has been set. -func (o *PartialUpdateServiceAccountKeyResponse) GetKeyOriginOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.KeyOrigin, true -} - -// SetKeyOrigin sets field value -func (o *PartialUpdateServiceAccountKeyResponse) SetKeyOrigin(v *string) { - o.KeyOrigin = v -} - -// GetKeyType returns the KeyType field value -func (o *PartialUpdateServiceAccountKeyResponse) GetKeyType() *string { - if o == nil { - var ret *string - return ret - } - - return o.KeyType -} - -// GetKeyTypeOk returns a tuple with the KeyType field value -// and a boolean to check if the value has been set. -func (o *PartialUpdateServiceAccountKeyResponse) GetKeyTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.KeyType, true -} - -// SetKeyType sets field value -func (o *PartialUpdateServiceAccountKeyResponse) SetKeyType(v *string) { - o.KeyType = v -} - -// GetValidUntil returns the ValidUntil field value if set, zero value otherwise. -func (o *PartialUpdateServiceAccountKeyResponse) GetValidUntil() *time.Time { - if o == nil || IsNil(o.ValidUntil) { - var ret *time.Time - return ret - } - return o.ValidUntil -} - -// GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PartialUpdateServiceAccountKeyResponse) GetValidUntilOk() (*time.Time, bool) { - if o == nil || IsNil(o.ValidUntil) { - return nil, false - } - return o.ValidUntil, true -} - -// HasValidUntil returns a boolean if a field has been set. -func (o *PartialUpdateServiceAccountKeyResponse) HasValidUntil() bool { - if o != nil && !IsNil(o.ValidUntil) { - return true - } - - return false -} - -// SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. -func (o *PartialUpdateServiceAccountKeyResponse) SetValidUntil(v *time.Time) { - o.ValidUntil = v -} - -func (o PartialUpdateServiceAccountKeyResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["active"] = o.Active - toSerialize["createdAt"] = o.CreatedAt - toSerialize["id"] = o.Id - toSerialize["keyAlgorithm"] = o.KeyAlgorithm - toSerialize["keyOrigin"] = o.KeyOrigin - toSerialize["keyType"] = o.KeyType - if !IsNil(o.ValidUntil) { - toSerialize["validUntil"] = o.ValidUntil - } - return toSerialize, nil -} - -type NullablePartialUpdateServiceAccountKeyResponse struct { - value *PartialUpdateServiceAccountKeyResponse - isSet bool -} - -func (v NullablePartialUpdateServiceAccountKeyResponse) Get() *PartialUpdateServiceAccountKeyResponse { - return v.value -} - -func (v *NullablePartialUpdateServiceAccountKeyResponse) Set(val *PartialUpdateServiceAccountKeyResponse) { - v.value = val - v.isSet = true -} - -func (v NullablePartialUpdateServiceAccountKeyResponse) IsSet() bool { - return v.isSet -} - -func (v *NullablePartialUpdateServiceAccountKeyResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePartialUpdateServiceAccountKeyResponse(val *PartialUpdateServiceAccountKeyResponse) *NullablePartialUpdateServiceAccountKeyResponse { - return &NullablePartialUpdateServiceAccountKeyResponse{value: val, isSet: true} -} - -func (v NullablePartialUpdateServiceAccountKeyResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePartialUpdateServiceAccountKeyResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/serviceaccount/model_service_account.go b/services/serviceaccount/model_service_account.go index c98329b69..35c0fa13a 100644 --- a/services/serviceaccount/model_service_account.go +++ b/services/serviceaccount/model_service_account.go @@ -10,13 +10,6 @@ API version: 2.0 package serviceaccount -import ( - "encoding/json" -) - -// checks if the ServiceAccount type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ServiceAccount{} - // ServiceAccount struct for ServiceAccount type ServiceAccount struct { // Unique identifier of the service account in format of an email address generated by the service containing the prefix provided by the user during creation. @@ -32,167 +25,3 @@ type ServiceAccount struct { // REQUIRED ProjectId *string `json:"projectId"` } - -type _ServiceAccount ServiceAccount - -// NewServiceAccount instantiates a new ServiceAccount object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewServiceAccount(email *string, id *string, internal *bool, projectId *string) *ServiceAccount { - this := ServiceAccount{} - this.Email = email - this.Id = id - this.Internal = internal - this.ProjectId = projectId - return &this -} - -// NewServiceAccountWithDefaults instantiates a new ServiceAccount object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewServiceAccountWithDefaults() *ServiceAccount { - this := ServiceAccount{} - return &this -} - -// GetEmail returns the Email field value -func (o *ServiceAccount) GetEmail() *string { - if o == nil { - var ret *string - return ret - } - - return o.Email -} - -// GetEmailOk returns a tuple with the Email field value -// and a boolean to check if the value has been set. -func (o *ServiceAccount) GetEmailOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Email, true -} - -// SetEmail sets field value -func (o *ServiceAccount) SetEmail(v *string) { - o.Email = v -} - -// GetId returns the Id field value -func (o *ServiceAccount) GetId() *string { - if o == nil { - var ret *string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *ServiceAccount) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Id, true -} - -// SetId sets field value -func (o *ServiceAccount) SetId(v *string) { - o.Id = v -} - -// GetInternal returns the Internal field value -func (o *ServiceAccount) GetInternal() *bool { - if o == nil { - var ret *bool - return ret - } - - return o.Internal -} - -// GetInternalOk returns a tuple with the Internal field value -// and a boolean to check if the value has been set. -func (o *ServiceAccount) GetInternalOk() (*bool, bool) { - if o == nil { - return nil, false - } - return o.Internal, true -} - -// SetInternal sets field value -func (o *ServiceAccount) SetInternal(v *bool) { - o.Internal = v -} - -// GetProjectId returns the ProjectId field value -func (o *ServiceAccount) GetProjectId() *string { - if o == nil { - var ret *string - return ret - } - - return o.ProjectId -} - -// GetProjectIdOk returns a tuple with the ProjectId field value -// and a boolean to check if the value has been set. -func (o *ServiceAccount) GetProjectIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ProjectId, true -} - -// SetProjectId sets field value -func (o *ServiceAccount) SetProjectId(v *string) { - o.ProjectId = v -} - -func (o ServiceAccount) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["email"] = o.Email - toSerialize["id"] = o.Id - toSerialize["internal"] = o.Internal - toSerialize["projectId"] = o.ProjectId - return toSerialize, nil -} - -type NullableServiceAccount struct { - value *ServiceAccount - isSet bool -} - -func (v NullableServiceAccount) Get() *ServiceAccount { - return v.value -} - -func (v *NullableServiceAccount) Set(val *ServiceAccount) { - v.value = val - v.isSet = true -} - -func (v NullableServiceAccount) IsSet() bool { - return v.isSet -} - -func (v *NullableServiceAccount) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableServiceAccount(val *ServiceAccount) *NullableServiceAccount { - return &NullableServiceAccount{value: val, isSet: true} -} - -func (v NullableServiceAccount) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableServiceAccount) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/serviceaccount/model_service_account_key_list_response.go b/services/serviceaccount/model_service_account_key_list_response.go index b2b53faf5..c59442372 100644 --- a/services/serviceaccount/model_service_account_key_list_response.go +++ b/services/serviceaccount/model_service_account_key_list_response.go @@ -11,13 +11,9 @@ API version: 2.0 package serviceaccount import ( - "encoding/json" "time" ) -// checks if the ServiceAccountKeyListResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ServiceAccountKeyListResponse{} - // ServiceAccountKeyListResponse struct for ServiceAccountKeyListResponse type ServiceAccountKeyListResponse struct { // REQUIRED @@ -37,254 +33,3 @@ type ServiceAccountKeyListResponse struct { // If specified, the timestamp until the key is active. May be null ValidUntil *time.Time `json:"validUntil,omitempty"` } - -type _ServiceAccountKeyListResponse ServiceAccountKeyListResponse - -// NewServiceAccountKeyListResponse instantiates a new ServiceAccountKeyListResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewServiceAccountKeyListResponse(active *bool, createdAt *time.Time, id *string, keyAlgorithm *string, keyOrigin *string, keyType *string) *ServiceAccountKeyListResponse { - this := ServiceAccountKeyListResponse{} - this.Active = active - this.CreatedAt = createdAt - this.Id = id - this.KeyAlgorithm = keyAlgorithm - this.KeyOrigin = keyOrigin - this.KeyType = keyType - return &this -} - -// NewServiceAccountKeyListResponseWithDefaults instantiates a new ServiceAccountKeyListResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewServiceAccountKeyListResponseWithDefaults() *ServiceAccountKeyListResponse { - this := ServiceAccountKeyListResponse{} - return &this -} - -// GetActive returns the Active field value -func (o *ServiceAccountKeyListResponse) GetActive() *bool { - if o == nil { - var ret *bool - return ret - } - - return o.Active -} - -// GetActiveOk returns a tuple with the Active field value -// and a boolean to check if the value has been set. -func (o *ServiceAccountKeyListResponse) GetActiveOk() (*bool, bool) { - if o == nil { - return nil, false - } - return o.Active, true -} - -// SetActive sets field value -func (o *ServiceAccountKeyListResponse) SetActive(v *bool) { - o.Active = v -} - -// GetCreatedAt returns the CreatedAt field value -func (o *ServiceAccountKeyListResponse) GetCreatedAt() *time.Time { - if o == nil { - var ret *time.Time - return ret - } - - return o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value -// and a boolean to check if the value has been set. -func (o *ServiceAccountKeyListResponse) GetCreatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.CreatedAt, true -} - -// SetCreatedAt sets field value -func (o *ServiceAccountKeyListResponse) SetCreatedAt(v *time.Time) { - o.CreatedAt = v -} - -// GetId returns the Id field value -func (o *ServiceAccountKeyListResponse) GetId() *string { - if o == nil { - var ret *string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *ServiceAccountKeyListResponse) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Id, true -} - -// SetId sets field value -func (o *ServiceAccountKeyListResponse) SetId(v *string) { - o.Id = v -} - -// GetKeyAlgorithm returns the KeyAlgorithm field value -func (o *ServiceAccountKeyListResponse) GetKeyAlgorithm() *string { - if o == nil { - var ret *string - return ret - } - - return o.KeyAlgorithm -} - -// GetKeyAlgorithmOk returns a tuple with the KeyAlgorithm field value -// and a boolean to check if the value has been set. -func (o *ServiceAccountKeyListResponse) GetKeyAlgorithmOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.KeyAlgorithm, true -} - -// SetKeyAlgorithm sets field value -func (o *ServiceAccountKeyListResponse) SetKeyAlgorithm(v *string) { - o.KeyAlgorithm = v -} - -// GetKeyOrigin returns the KeyOrigin field value -func (o *ServiceAccountKeyListResponse) GetKeyOrigin() *string { - if o == nil { - var ret *string - return ret - } - - return o.KeyOrigin -} - -// GetKeyOriginOk returns a tuple with the KeyOrigin field value -// and a boolean to check if the value has been set. -func (o *ServiceAccountKeyListResponse) GetKeyOriginOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.KeyOrigin, true -} - -// SetKeyOrigin sets field value -func (o *ServiceAccountKeyListResponse) SetKeyOrigin(v *string) { - o.KeyOrigin = v -} - -// GetKeyType returns the KeyType field value -func (o *ServiceAccountKeyListResponse) GetKeyType() *string { - if o == nil { - var ret *string - return ret - } - - return o.KeyType -} - -// GetKeyTypeOk returns a tuple with the KeyType field value -// and a boolean to check if the value has been set. -func (o *ServiceAccountKeyListResponse) GetKeyTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.KeyType, true -} - -// SetKeyType sets field value -func (o *ServiceAccountKeyListResponse) SetKeyType(v *string) { - o.KeyType = v -} - -// GetValidUntil returns the ValidUntil field value if set, zero value otherwise. -func (o *ServiceAccountKeyListResponse) GetValidUntil() *time.Time { - if o == nil || IsNil(o.ValidUntil) { - var ret *time.Time - return ret - } - return o.ValidUntil -} - -// GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ServiceAccountKeyListResponse) GetValidUntilOk() (*time.Time, bool) { - if o == nil || IsNil(o.ValidUntil) { - return nil, false - } - return o.ValidUntil, true -} - -// HasValidUntil returns a boolean if a field has been set. -func (o *ServiceAccountKeyListResponse) HasValidUntil() bool { - if o != nil && !IsNil(o.ValidUntil) { - return true - } - - return false -} - -// SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field. -func (o *ServiceAccountKeyListResponse) SetValidUntil(v *time.Time) { - o.ValidUntil = v -} - -func (o ServiceAccountKeyListResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["active"] = o.Active - toSerialize["createdAt"] = o.CreatedAt - toSerialize["id"] = o.Id - toSerialize["keyAlgorithm"] = o.KeyAlgorithm - toSerialize["keyOrigin"] = o.KeyOrigin - toSerialize["keyType"] = o.KeyType - if !IsNil(o.ValidUntil) { - toSerialize["validUntil"] = o.ValidUntil - } - return toSerialize, nil -} - -type NullableServiceAccountKeyListResponse struct { - value *ServiceAccountKeyListResponse - isSet bool -} - -func (v NullableServiceAccountKeyListResponse) Get() *ServiceAccountKeyListResponse { - return v.value -} - -func (v *NullableServiceAccountKeyListResponse) Set(val *ServiceAccountKeyListResponse) { - v.value = val - v.isSet = true -} - -func (v NullableServiceAccountKeyListResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableServiceAccountKeyListResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableServiceAccountKeyListResponse(val *ServiceAccountKeyListResponse) *NullableServiceAccountKeyListResponse { - return &NullableServiceAccountKeyListResponse{value: val, isSet: true} -} - -func (v NullableServiceAccountKeyListResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableServiceAccountKeyListResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -}