/* 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 UpdateDatabasePartiallyRequestPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateDatabasePartiallyRequestPayload{} /* types and functions for name */ // isNotNullableString type UpdateDatabasePartiallyRequestPayloadGetNameAttributeType = *string func getUpdateDatabasePartiallyRequestPayloadGetNameAttributeTypeOk(arg UpdateDatabasePartiallyRequestPayloadGetNameAttributeType) (ret UpdateDatabasePartiallyRequestPayloadGetNameRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setUpdateDatabasePartiallyRequestPayloadGetNameAttributeType(arg *UpdateDatabasePartiallyRequestPayloadGetNameAttributeType, val UpdateDatabasePartiallyRequestPayloadGetNameRetType) { *arg = &val } type UpdateDatabasePartiallyRequestPayloadGetNameArgType = string type UpdateDatabasePartiallyRequestPayloadGetNameRetType = string /* types and functions for owner */ // isNotNullableString type UpdateDatabasePartiallyRequestPayloadGetOwnerAttributeType = *string func getUpdateDatabasePartiallyRequestPayloadGetOwnerAttributeTypeOk(arg UpdateDatabasePartiallyRequestPayloadGetOwnerAttributeType) (ret UpdateDatabasePartiallyRequestPayloadGetOwnerRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setUpdateDatabasePartiallyRequestPayloadGetOwnerAttributeType(arg *UpdateDatabasePartiallyRequestPayloadGetOwnerAttributeType, val UpdateDatabasePartiallyRequestPayloadGetOwnerRetType) { *arg = &val } type UpdateDatabasePartiallyRequestPayloadGetOwnerArgType = string type UpdateDatabasePartiallyRequestPayloadGetOwnerRetType = string // UpdateDatabasePartiallyRequestPayload struct for UpdateDatabasePartiallyRequestPayload type UpdateDatabasePartiallyRequestPayload struct { // The name of the database. Name UpdateDatabasePartiallyRequestPayloadGetNameAttributeType `json:"name,omitempty"` // The owner of the database. Owner UpdateDatabasePartiallyRequestPayloadGetOwnerAttributeType `json:"owner,omitempty"` } // NewUpdateDatabasePartiallyRequestPayload instantiates a new UpdateDatabasePartiallyRequestPayload 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 NewUpdateDatabasePartiallyRequestPayload() *UpdateDatabasePartiallyRequestPayload { this := UpdateDatabasePartiallyRequestPayload{} return &this } // NewUpdateDatabasePartiallyRequestPayloadWithDefaults instantiates a new UpdateDatabasePartiallyRequestPayload 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 NewUpdateDatabasePartiallyRequestPayloadWithDefaults() *UpdateDatabasePartiallyRequestPayload { this := UpdateDatabasePartiallyRequestPayload{} return &this } // GetName returns the Name field value if set, zero value otherwise. func (o *UpdateDatabasePartiallyRequestPayload) GetName() (res UpdateDatabasePartiallyRequestPayloadGetNameRetType) { 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 *UpdateDatabasePartiallyRequestPayload) GetNameOk() (ret UpdateDatabasePartiallyRequestPayloadGetNameRetType, ok bool) { return getUpdateDatabasePartiallyRequestPayloadGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. func (o *UpdateDatabasePartiallyRequestPayload) HasName() bool { _, ok := o.GetNameOk() return ok } // SetName gets a reference to the given string and assigns it to the Name field. func (o *UpdateDatabasePartiallyRequestPayload) SetName(v UpdateDatabasePartiallyRequestPayloadGetNameRetType) { setUpdateDatabasePartiallyRequestPayloadGetNameAttributeType(&o.Name, v) } // GetOwner returns the Owner field value if set, zero value otherwise. func (o *UpdateDatabasePartiallyRequestPayload) GetOwner() (res UpdateDatabasePartiallyRequestPayloadGetOwnerRetType) { res, _ = o.GetOwnerOk() return } // GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *UpdateDatabasePartiallyRequestPayload) GetOwnerOk() (ret UpdateDatabasePartiallyRequestPayloadGetOwnerRetType, ok bool) { return getUpdateDatabasePartiallyRequestPayloadGetOwnerAttributeTypeOk(o.Owner) } // HasOwner returns a boolean if a field has been set. func (o *UpdateDatabasePartiallyRequestPayload) HasOwner() bool { _, ok := o.GetOwnerOk() return ok } // SetOwner gets a reference to the given string and assigns it to the Owner field. func (o *UpdateDatabasePartiallyRequestPayload) SetOwner(v UpdateDatabasePartiallyRequestPayloadGetOwnerRetType) { setUpdateDatabasePartiallyRequestPayloadGetOwnerAttributeType(&o.Owner, v) } func (o UpdateDatabasePartiallyRequestPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getUpdateDatabasePartiallyRequestPayloadGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } if val, ok := getUpdateDatabasePartiallyRequestPayloadGetOwnerAttributeTypeOk(o.Owner); ok { toSerialize["Owner"] = val } return toSerialize, nil } type NullableUpdateDatabasePartiallyRequestPayload struct { value *UpdateDatabasePartiallyRequestPayload isSet bool } func (v NullableUpdateDatabasePartiallyRequestPayload) Get() *UpdateDatabasePartiallyRequestPayload { return v.value } func (v *NullableUpdateDatabasePartiallyRequestPayload) Set(val *UpdateDatabasePartiallyRequestPayload) { v.value = val v.isSet = true } func (v NullableUpdateDatabasePartiallyRequestPayload) IsSet() bool { return v.isSet } func (v *NullableUpdateDatabasePartiallyRequestPayload) Unset() { v.value = nil v.isSet = false } func NewNullableUpdateDatabasePartiallyRequestPayload(val *UpdateDatabasePartiallyRequestPayload) *NullableUpdateDatabasePartiallyRequestPayload { return &NullableUpdateDatabasePartiallyRequestPayload{value: val, isSet: true} } func (v NullableUpdateDatabasePartiallyRequestPayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableUpdateDatabasePartiallyRequestPayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }