/* PostgreSQL Flex API This is the documentation for the STACKIT Postgres Flex service API version: 3alpha1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package postgresflexalpha import ( "encoding/json" ) // checks if the UpdateUserRequestPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateUserRequestPayload{} /* types and functions for name */ // isNotNullableString type UpdateUserRequestPayloadGetNameAttributeType = *string func getUpdateUserRequestPayloadGetNameAttributeTypeOk(arg UpdateUserRequestPayloadGetNameAttributeType) (ret UpdateUserRequestPayloadGetNameRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setUpdateUserRequestPayloadGetNameAttributeType(arg *UpdateUserRequestPayloadGetNameAttributeType, val UpdateUserRequestPayloadGetNameRetType) { *arg = &val } type UpdateUserRequestPayloadGetNameArgType = string type UpdateUserRequestPayloadGetNameRetType = string /* types and functions for roles */ // isArray type UpdateUserRequestPayloadGetRolesAttributeType = *[]UserRole type UpdateUserRequestPayloadGetRolesArgType = []UserRole type UpdateUserRequestPayloadGetRolesRetType = []UserRole func getUpdateUserRequestPayloadGetRolesAttributeTypeOk(arg UpdateUserRequestPayloadGetRolesAttributeType) (ret UpdateUserRequestPayloadGetRolesRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setUpdateUserRequestPayloadGetRolesAttributeType(arg *UpdateUserRequestPayloadGetRolesAttributeType, val UpdateUserRequestPayloadGetRolesRetType) { *arg = &val } // UpdateUserRequestPayload struct for UpdateUserRequestPayload type UpdateUserRequestPayload struct { // The name of the user. Name UpdateUserRequestPayloadGetNameAttributeType `json:"name,omitempty"` // A list containing the user roles for the instance. // REQUIRED Roles UpdateUserRequestPayloadGetRolesAttributeType `json:"roles" required:"true"` } type _UpdateUserRequestPayload UpdateUserRequestPayload // NewUpdateUserRequestPayload instantiates a new UpdateUserRequestPayload 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 NewUpdateUserRequestPayload(roles UpdateUserRequestPayloadGetRolesArgType) *UpdateUserRequestPayload { this := UpdateUserRequestPayload{} setUpdateUserRequestPayloadGetRolesAttributeType(&this.Roles, roles) return &this } // NewUpdateUserRequestPayloadWithDefaults instantiates a new UpdateUserRequestPayload 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 NewUpdateUserRequestPayloadWithDefaults() *UpdateUserRequestPayload { this := UpdateUserRequestPayload{} return &this } // GetName returns the Name field value if set, zero value otherwise. func (o *UpdateUserRequestPayload) GetName() (res UpdateUserRequestPayloadGetNameRetType) { res, _ = o.GetNameOk() return } // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UpdateUserRequestPayload) GetNameOk() (ret UpdateUserRequestPayloadGetNameRetType, ok bool) { return getUpdateUserRequestPayloadGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. func (o *UpdateUserRequestPayload) HasName() bool { _, ok := o.GetNameOk() return ok } // SetName gets a reference to the given string and assigns it to the Name field. func (o *UpdateUserRequestPayload) SetName(v UpdateUserRequestPayloadGetNameRetType) { setUpdateUserRequestPayloadGetNameAttributeType(&o.Name, v) } // GetRoles returns the Roles field value func (o *UpdateUserRequestPayload) GetRoles() (ret UpdateUserRequestPayloadGetRolesRetType) { ret, _ = o.GetRolesOk() return ret } // GetRolesOk returns a tuple with the Roles field value // and a boolean to check if the value has been set. func (o *UpdateUserRequestPayload) GetRolesOk() (ret UpdateUserRequestPayloadGetRolesRetType, ok bool) { return getUpdateUserRequestPayloadGetRolesAttributeTypeOk(o.Roles) } // SetRoles sets field value func (o *UpdateUserRequestPayload) SetRoles(v UpdateUserRequestPayloadGetRolesRetType) { setUpdateUserRequestPayloadGetRolesAttributeType(&o.Roles, v) } func (o UpdateUserRequestPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getUpdateUserRequestPayloadGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } if val, ok := getUpdateUserRequestPayloadGetRolesAttributeTypeOk(o.Roles); ok { toSerialize["Roles"] = val } return toSerialize, nil } type NullableUpdateUserRequestPayload struct { value *UpdateUserRequestPayload isSet bool } func (v NullableUpdateUserRequestPayload) Get() *UpdateUserRequestPayload { return v.value } func (v *NullableUpdateUserRequestPayload) Set(val *UpdateUserRequestPayload) { v.value = val v.isSet = true } func (v NullableUpdateUserRequestPayload) IsSet() bool { return v.isSet } func (v *NullableUpdateUserRequestPayload) Unset() { v.value = nil v.isSet = false } func NewNullableUpdateUserRequestPayload(val *UpdateUserRequestPayload) *NullableUpdateUserRequestPayload { return &NullableUpdateUserRequestPayload{value: val, isSet: true} } func (v NullableUpdateUserRequestPayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableUpdateUserRequestPayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }