/* 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 UpdateUserPartiallyRequestPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateUserPartiallyRequestPayload{} /* types and functions for name */ // isNotNullableString type UpdateUserPartiallyRequestPayloadGetNameAttributeType = *string func getUpdateUserPartiallyRequestPayloadGetNameAttributeTypeOk(arg UpdateUserPartiallyRequestPayloadGetNameAttributeType) (ret UpdateUserPartiallyRequestPayloadGetNameRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setUpdateUserPartiallyRequestPayloadGetNameAttributeType(arg *UpdateUserPartiallyRequestPayloadGetNameAttributeType, val UpdateUserPartiallyRequestPayloadGetNameRetType) { *arg = &val } type UpdateUserPartiallyRequestPayloadGetNameArgType = string type UpdateUserPartiallyRequestPayloadGetNameRetType = string /* types and functions for roles */ // isArray type UpdateUserPartiallyRequestPayloadGetRolesAttributeType = *[]UserRole type UpdateUserPartiallyRequestPayloadGetRolesArgType = []UserRole type UpdateUserPartiallyRequestPayloadGetRolesRetType = []UserRole func getUpdateUserPartiallyRequestPayloadGetRolesAttributeTypeOk(arg UpdateUserPartiallyRequestPayloadGetRolesAttributeType) (ret UpdateUserPartiallyRequestPayloadGetRolesRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setUpdateUserPartiallyRequestPayloadGetRolesAttributeType(arg *UpdateUserPartiallyRequestPayloadGetRolesAttributeType, val UpdateUserPartiallyRequestPayloadGetRolesRetType) { *arg = &val } // UpdateUserPartiallyRequestPayload struct for UpdateUserPartiallyRequestPayload type UpdateUserPartiallyRequestPayload struct { // The name of the user. Name UpdateUserPartiallyRequestPayloadGetNameAttributeType `json:"name,omitempty"` // A list containing the user roles for the instance. Roles UpdateUserPartiallyRequestPayloadGetRolesAttributeType `json:"roles,omitempty"` } // NewUpdateUserPartiallyRequestPayload instantiates a new UpdateUserPartiallyRequestPayload 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 NewUpdateUserPartiallyRequestPayload() *UpdateUserPartiallyRequestPayload { this := UpdateUserPartiallyRequestPayload{} return &this } // NewUpdateUserPartiallyRequestPayloadWithDefaults instantiates a new UpdateUserPartiallyRequestPayload 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 NewUpdateUserPartiallyRequestPayloadWithDefaults() *UpdateUserPartiallyRequestPayload { this := UpdateUserPartiallyRequestPayload{} return &this } // GetName returns the Name field value if set, zero value otherwise. func (o *UpdateUserPartiallyRequestPayload) GetName() (res UpdateUserPartiallyRequestPayloadGetNameRetType) { 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 *UpdateUserPartiallyRequestPayload) GetNameOk() (ret UpdateUserPartiallyRequestPayloadGetNameRetType, ok bool) { return getUpdateUserPartiallyRequestPayloadGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. func (o *UpdateUserPartiallyRequestPayload) HasName() bool { _, ok := o.GetNameOk() return ok } // SetName gets a reference to the given string and assigns it to the Name field. func (o *UpdateUserPartiallyRequestPayload) SetName(v UpdateUserPartiallyRequestPayloadGetNameRetType) { setUpdateUserPartiallyRequestPayloadGetNameAttributeType(&o.Name, v) } // GetRoles returns the Roles field value if set, zero value otherwise. func (o *UpdateUserPartiallyRequestPayload) GetRoles() (res UpdateUserPartiallyRequestPayloadGetRolesRetType) { res, _ = o.GetRolesOk() return } // GetRolesOk returns a tuple with the Roles field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UpdateUserPartiallyRequestPayload) GetRolesOk() (ret UpdateUserPartiallyRequestPayloadGetRolesRetType, ok bool) { return getUpdateUserPartiallyRequestPayloadGetRolesAttributeTypeOk(o.Roles) } // HasRoles returns a boolean if a field has been set. func (o *UpdateUserPartiallyRequestPayload) HasRoles() bool { _, ok := o.GetRolesOk() return ok } // SetRoles gets a reference to the given []UserRole and assigns it to the Roles field. func (o *UpdateUserPartiallyRequestPayload) SetRoles(v UpdateUserPartiallyRequestPayloadGetRolesRetType) { setUpdateUserPartiallyRequestPayloadGetRolesAttributeType(&o.Roles, v) } func (o UpdateUserPartiallyRequestPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getUpdateUserPartiallyRequestPayloadGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } if val, ok := getUpdateUserPartiallyRequestPayloadGetRolesAttributeTypeOk(o.Roles); ok { toSerialize["Roles"] = val } return toSerialize, nil } type NullableUpdateUserPartiallyRequestPayload struct { value *UpdateUserPartiallyRequestPayload isSet bool } func (v NullableUpdateUserPartiallyRequestPayload) Get() *UpdateUserPartiallyRequestPayload { return v.value } func (v *NullableUpdateUserPartiallyRequestPayload) Set(val *UpdateUserPartiallyRequestPayload) { v.value = val v.isSet = true } func (v NullableUpdateUserPartiallyRequestPayload) IsSet() bool { return v.isSet } func (v *NullableUpdateUserPartiallyRequestPayload) Unset() { v.value = nil v.isSet = false } func NewNullableUpdateUserPartiallyRequestPayload(val *UpdateUserPartiallyRequestPayload) *NullableUpdateUserPartiallyRequestPayload { return &NullableUpdateUserPartiallyRequestPayload{value: val, isSet: true} } func (v NullableUpdateUserPartiallyRequestPayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableUpdateUserPartiallyRequestPayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }