172 lines
5.8 KiB
Go
172 lines
5.8 KiB
Go
/*
|
|
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 UpdateDatabaseRequestPayload type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &UpdateDatabaseRequestPayload{}
|
|
|
|
/*
|
|
types and functions for name
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type UpdateDatabaseRequestPayloadGetNameAttributeType = *string
|
|
|
|
func getUpdateDatabaseRequestPayloadGetNameAttributeTypeOk(arg UpdateDatabaseRequestPayloadGetNameAttributeType) (ret UpdateDatabaseRequestPayloadGetNameRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setUpdateDatabaseRequestPayloadGetNameAttributeType(arg *UpdateDatabaseRequestPayloadGetNameAttributeType, val UpdateDatabaseRequestPayloadGetNameRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type UpdateDatabaseRequestPayloadGetNameArgType = string
|
|
type UpdateDatabaseRequestPayloadGetNameRetType = string
|
|
|
|
/*
|
|
types and functions for owner
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type UpdateDatabaseRequestPayloadGetOwnerAttributeType = *string
|
|
|
|
func getUpdateDatabaseRequestPayloadGetOwnerAttributeTypeOk(arg UpdateDatabaseRequestPayloadGetOwnerAttributeType) (ret UpdateDatabaseRequestPayloadGetOwnerRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setUpdateDatabaseRequestPayloadGetOwnerAttributeType(arg *UpdateDatabaseRequestPayloadGetOwnerAttributeType, val UpdateDatabaseRequestPayloadGetOwnerRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type UpdateDatabaseRequestPayloadGetOwnerArgType = string
|
|
type UpdateDatabaseRequestPayloadGetOwnerRetType = string
|
|
|
|
// UpdateDatabaseRequestPayload struct for UpdateDatabaseRequestPayload
|
|
type UpdateDatabaseRequestPayload struct {
|
|
// The name of the database.
|
|
// REQUIRED
|
|
Name UpdateDatabaseRequestPayloadGetNameAttributeType `json:"name" required:"true"`
|
|
// The owner of the database.
|
|
// REQUIRED
|
|
Owner UpdateDatabaseRequestPayloadGetOwnerAttributeType `json:"owner" required:"true"`
|
|
}
|
|
|
|
type _UpdateDatabaseRequestPayload UpdateDatabaseRequestPayload
|
|
|
|
// NewUpdateDatabaseRequestPayload instantiates a new UpdateDatabaseRequestPayload 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 NewUpdateDatabaseRequestPayload(name UpdateDatabaseRequestPayloadGetNameArgType, owner UpdateDatabaseRequestPayloadGetOwnerArgType) *UpdateDatabaseRequestPayload {
|
|
this := UpdateDatabaseRequestPayload{}
|
|
setUpdateDatabaseRequestPayloadGetNameAttributeType(&this.Name, name)
|
|
setUpdateDatabaseRequestPayloadGetOwnerAttributeType(&this.Owner, owner)
|
|
return &this
|
|
}
|
|
|
|
// NewUpdateDatabaseRequestPayloadWithDefaults instantiates a new UpdateDatabaseRequestPayload 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 NewUpdateDatabaseRequestPayloadWithDefaults() *UpdateDatabaseRequestPayload {
|
|
this := UpdateDatabaseRequestPayload{}
|
|
return &this
|
|
}
|
|
|
|
// GetName returns the Name field value
|
|
func (o *UpdateDatabaseRequestPayload) GetName() (ret UpdateDatabaseRequestPayloadGetNameRetType) {
|
|
ret, _ = o.GetNameOk()
|
|
return ret
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *UpdateDatabaseRequestPayload) GetNameOk() (ret UpdateDatabaseRequestPayloadGetNameRetType, ok bool) {
|
|
return getUpdateDatabaseRequestPayloadGetNameAttributeTypeOk(o.Name)
|
|
}
|
|
|
|
// SetName sets field value
|
|
func (o *UpdateDatabaseRequestPayload) SetName(v UpdateDatabaseRequestPayloadGetNameRetType) {
|
|
setUpdateDatabaseRequestPayloadGetNameAttributeType(&o.Name, v)
|
|
}
|
|
|
|
// GetOwner returns the Owner field value
|
|
func (o *UpdateDatabaseRequestPayload) GetOwner() (ret UpdateDatabaseRequestPayloadGetOwnerRetType) {
|
|
ret, _ = o.GetOwnerOk()
|
|
return ret
|
|
}
|
|
|
|
// GetOwnerOk returns a tuple with the Owner field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *UpdateDatabaseRequestPayload) GetOwnerOk() (ret UpdateDatabaseRequestPayloadGetOwnerRetType, ok bool) {
|
|
return getUpdateDatabaseRequestPayloadGetOwnerAttributeTypeOk(o.Owner)
|
|
}
|
|
|
|
// SetOwner sets field value
|
|
func (o *UpdateDatabaseRequestPayload) SetOwner(v UpdateDatabaseRequestPayloadGetOwnerRetType) {
|
|
setUpdateDatabaseRequestPayloadGetOwnerAttributeType(&o.Owner, v)
|
|
}
|
|
|
|
func (o UpdateDatabaseRequestPayload) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getUpdateDatabaseRequestPayloadGetNameAttributeTypeOk(o.Name); ok {
|
|
toSerialize["Name"] = val
|
|
}
|
|
if val, ok := getUpdateDatabaseRequestPayloadGetOwnerAttributeTypeOk(o.Owner); ok {
|
|
toSerialize["Owner"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableUpdateDatabaseRequestPayload struct {
|
|
value *UpdateDatabaseRequestPayload
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableUpdateDatabaseRequestPayload) Get() *UpdateDatabaseRequestPayload {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableUpdateDatabaseRequestPayload) Set(val *UpdateDatabaseRequestPayload) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableUpdateDatabaseRequestPayload) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableUpdateDatabaseRequestPayload) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableUpdateDatabaseRequestPayload(val *UpdateDatabaseRequestPayload) *NullableUpdateDatabaseRequestPayload {
|
|
return &NullableUpdateDatabaseRequestPayload{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableUpdateDatabaseRequestPayload) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableUpdateDatabaseRequestPayload) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|