176 lines
5.9 KiB
Go
176 lines
5.9 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 CreateDatabaseRequestPayload type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &CreateDatabaseRequestPayload{}
|
|
|
|
/*
|
|
types and functions for name
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type CreateDatabaseRequestPayloadGetNameAttributeType = *string
|
|
|
|
func getCreateDatabaseRequestPayloadGetNameAttributeTypeOk(arg CreateDatabaseRequestPayloadGetNameAttributeType) (ret CreateDatabaseRequestPayloadGetNameRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreateDatabaseRequestPayloadGetNameAttributeType(arg *CreateDatabaseRequestPayloadGetNameAttributeType, val CreateDatabaseRequestPayloadGetNameRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type CreateDatabaseRequestPayloadGetNameArgType = string
|
|
type CreateDatabaseRequestPayloadGetNameRetType = string
|
|
|
|
/*
|
|
types and functions for owner
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type CreateDatabaseRequestPayloadGetOwnerAttributeType = *string
|
|
|
|
func getCreateDatabaseRequestPayloadGetOwnerAttributeTypeOk(arg CreateDatabaseRequestPayloadGetOwnerAttributeType) (ret CreateDatabaseRequestPayloadGetOwnerRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreateDatabaseRequestPayloadGetOwnerAttributeType(arg *CreateDatabaseRequestPayloadGetOwnerAttributeType, val CreateDatabaseRequestPayloadGetOwnerRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type CreateDatabaseRequestPayloadGetOwnerArgType = string
|
|
type CreateDatabaseRequestPayloadGetOwnerRetType = string
|
|
|
|
// CreateDatabaseRequestPayload struct for CreateDatabaseRequestPayload
|
|
type CreateDatabaseRequestPayload struct {
|
|
// The name of the database.
|
|
// REQUIRED
|
|
Name CreateDatabaseRequestPayloadGetNameAttributeType `json:"name" required:"true"`
|
|
// The owner of the database.
|
|
Owner CreateDatabaseRequestPayloadGetOwnerAttributeType `json:"owner,omitempty"`
|
|
}
|
|
|
|
type _CreateDatabaseRequestPayload CreateDatabaseRequestPayload
|
|
|
|
// NewCreateDatabaseRequestPayload instantiates a new CreateDatabaseRequestPayload 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 NewCreateDatabaseRequestPayload(name CreateDatabaseRequestPayloadGetNameArgType) *CreateDatabaseRequestPayload {
|
|
this := CreateDatabaseRequestPayload{}
|
|
setCreateDatabaseRequestPayloadGetNameAttributeType(&this.Name, name)
|
|
return &this
|
|
}
|
|
|
|
// NewCreateDatabaseRequestPayloadWithDefaults instantiates a new CreateDatabaseRequestPayload 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 NewCreateDatabaseRequestPayloadWithDefaults() *CreateDatabaseRequestPayload {
|
|
this := CreateDatabaseRequestPayload{}
|
|
return &this
|
|
}
|
|
|
|
// GetName returns the Name field value
|
|
func (o *CreateDatabaseRequestPayload) GetName() (ret CreateDatabaseRequestPayloadGetNameRetType) {
|
|
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 *CreateDatabaseRequestPayload) GetNameOk() (ret CreateDatabaseRequestPayloadGetNameRetType, ok bool) {
|
|
return getCreateDatabaseRequestPayloadGetNameAttributeTypeOk(o.Name)
|
|
}
|
|
|
|
// SetName sets field value
|
|
func (o *CreateDatabaseRequestPayload) SetName(v CreateDatabaseRequestPayloadGetNameRetType) {
|
|
setCreateDatabaseRequestPayloadGetNameAttributeType(&o.Name, v)
|
|
}
|
|
|
|
// GetOwner returns the Owner field value if set, zero value otherwise.
|
|
func (o *CreateDatabaseRequestPayload) GetOwner() (res CreateDatabaseRequestPayloadGetOwnerRetType) {
|
|
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 *CreateDatabaseRequestPayload) GetOwnerOk() (ret CreateDatabaseRequestPayloadGetOwnerRetType, ok bool) {
|
|
return getCreateDatabaseRequestPayloadGetOwnerAttributeTypeOk(o.Owner)
|
|
}
|
|
|
|
// HasOwner returns a boolean if a field has been set.
|
|
func (o *CreateDatabaseRequestPayload) HasOwner() bool {
|
|
_, ok := o.GetOwnerOk()
|
|
return ok
|
|
}
|
|
|
|
// SetOwner gets a reference to the given string and assigns it to the Owner field.
|
|
func (o *CreateDatabaseRequestPayload) SetOwner(v CreateDatabaseRequestPayloadGetOwnerRetType) {
|
|
setCreateDatabaseRequestPayloadGetOwnerAttributeType(&o.Owner, v)
|
|
}
|
|
|
|
func (o CreateDatabaseRequestPayload) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getCreateDatabaseRequestPayloadGetNameAttributeTypeOk(o.Name); ok {
|
|
toSerialize["Name"] = val
|
|
}
|
|
if val, ok := getCreateDatabaseRequestPayloadGetOwnerAttributeTypeOk(o.Owner); ok {
|
|
toSerialize["Owner"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableCreateDatabaseRequestPayload struct {
|
|
value *CreateDatabaseRequestPayload
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableCreateDatabaseRequestPayload) Get() *CreateDatabaseRequestPayload {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableCreateDatabaseRequestPayload) Set(val *CreateDatabaseRequestPayload) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableCreateDatabaseRequestPayload) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableCreateDatabaseRequestPayload) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableCreateDatabaseRequestPayload(val *CreateDatabaseRequestPayload) *NullableCreateDatabaseRequestPayload {
|
|
return &NullableCreateDatabaseRequestPayload{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableCreateDatabaseRequestPayload) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableCreateDatabaseRequestPayload) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|