diff --git a/services/postgresflex/CHANGELOG.md b/services/postgresflex/CHANGELOG.md index 842f171be..bccde67fc 100644 --- a/services/postgresflex/CHANGELOG.md +++ b/services/postgresflex/CHANGELOG.md @@ -1,3 +1,7 @@ +## v0.16.0 (2024-10-14) + +- **Feature:** Add support for nullable models + ## v0.15.0 (2024-06-28) - **Feature**: New API methods `CreateDatabase`, `DeleteDatabase`, `ListDatabase`, `ListDatabaseParameters` to manage PostgreSQL Flex databases diff --git a/services/postgresflex/model_acl.go b/services/postgresflex/model_acl.go index e4403568d..a5b2352aa 100644 --- a/services/postgresflex/model_acl.go +++ b/services/postgresflex/model_acl.go @@ -10,7 +10,107 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the ACL type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ACL{} + // ACL struct for ACL type ACL struct { Items *[]string `json:"items,omitempty"` } + +// NewACL instantiates a new ACL 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 NewACL() *ACL { + this := ACL{} + return &this +} + +// NewACLWithDefaults instantiates a new ACL 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 NewACLWithDefaults() *ACL { + this := ACL{} + return &this +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ACL) GetItems() *[]string { + if o == nil || IsNil(o.Items) { + var ret *[]string + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ACL) GetItemsOk() (*[]string, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *ACL) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []string and assigns it to the Items field. +func (o *ACL) SetItems(v *[]string) { + o.Items = v +} + +func (o ACL) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + return toSerialize, nil +} + +type NullableACL struct { + value *ACL + isSet bool +} + +func (v NullableACL) Get() *ACL { + return v.value +} + +func (v *NullableACL) Set(val *ACL) { + v.value = val + v.isSet = true +} + +func (v NullableACL) IsSet() bool { + return v.isSet +} + +func (v *NullableACL) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableACL(val *ACL) *NullableACL { + return &NullableACL{value: val, isSet: true} +} + +func (v NullableACL) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableACL) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_api_configuration.go b/services/postgresflex/model_api_configuration.go index 0a987c120..d0d5f2d56 100644 --- a/services/postgresflex/model_api_configuration.go +++ b/services/postgresflex/model_api_configuration.go @@ -10,8 +10,143 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the ApiConfiguration type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApiConfiguration{} + // ApiConfiguration struct for ApiConfiguration type ApiConfiguration struct { Name *string `json:"name,omitempty"` Setting *string `json:"setting,omitempty"` } + +// NewApiConfiguration instantiates a new ApiConfiguration 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 NewApiConfiguration() *ApiConfiguration { + this := ApiConfiguration{} + return &this +} + +// NewApiConfigurationWithDefaults instantiates a new ApiConfiguration 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 NewApiConfigurationWithDefaults() *ApiConfiguration { + this := ApiConfiguration{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ApiConfiguration) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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 *ApiConfiguration) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ApiConfiguration) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ApiConfiguration) SetName(v *string) { + o.Name = v +} + +// GetSetting returns the Setting field value if set, zero value otherwise. +func (o *ApiConfiguration) GetSetting() *string { + if o == nil || IsNil(o.Setting) { + var ret *string + return ret + } + return o.Setting +} + +// GetSettingOk returns a tuple with the Setting field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiConfiguration) GetSettingOk() (*string, bool) { + if o == nil || IsNil(o.Setting) { + return nil, false + } + return o.Setting, true +} + +// HasSetting returns a boolean if a field has been set. +func (o *ApiConfiguration) HasSetting() bool { + if o != nil && !IsNil(o.Setting) { + return true + } + + return false +} + +// SetSetting gets a reference to the given string and assigns it to the Setting field. +func (o *ApiConfiguration) SetSetting(v *string) { + o.Setting = v +} + +func (o ApiConfiguration) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Setting) { + toSerialize["setting"] = o.Setting + } + return toSerialize, nil +} + +type NullableApiConfiguration struct { + value *ApiConfiguration + isSet bool +} + +func (v NullableApiConfiguration) Get() *ApiConfiguration { + return v.value +} + +func (v *NullableApiConfiguration) Set(val *ApiConfiguration) { + v.value = val + v.isSet = true +} + +func (v NullableApiConfiguration) IsSet() bool { + return v.isSet +} + +func (v *NullableApiConfiguration) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApiConfiguration(val *ApiConfiguration) *NullableApiConfiguration { + return &NullableApiConfiguration{value: val, isSet: true} +} + +func (v NullableApiConfiguration) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApiConfiguration) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_api_extension_config_load_response.go b/services/postgresflex/model_api_extension_config_load_response.go index b447ddabd..4aa48e413 100644 --- a/services/postgresflex/model_api_extension_config_load_response.go +++ b/services/postgresflex/model_api_extension_config_load_response.go @@ -10,8 +10,108 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the ApiExtensionConfigLoadResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApiExtensionConfigLoadResponse{} + // ApiExtensionConfigLoadResponse struct for ApiExtensionConfigLoadResponse type ApiExtensionConfigLoadResponse struct { // Returns marshalled JSON of the new configuration of whatever extension is called Configuration *[]ApiConfiguration `json:"configuration,omitempty"` } + +// NewApiExtensionConfigLoadResponse instantiates a new ApiExtensionConfigLoadResponse 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 NewApiExtensionConfigLoadResponse() *ApiExtensionConfigLoadResponse { + this := ApiExtensionConfigLoadResponse{} + return &this +} + +// NewApiExtensionConfigLoadResponseWithDefaults instantiates a new ApiExtensionConfigLoadResponse 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 NewApiExtensionConfigLoadResponseWithDefaults() *ApiExtensionConfigLoadResponse { + this := ApiExtensionConfigLoadResponse{} + return &this +} + +// GetConfiguration returns the Configuration field value if set, zero value otherwise. +func (o *ApiExtensionConfigLoadResponse) GetConfiguration() *[]ApiConfiguration { + if o == nil || IsNil(o.Configuration) { + var ret *[]ApiConfiguration + return ret + } + return o.Configuration +} + +// GetConfigurationOk returns a tuple with the Configuration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiExtensionConfigLoadResponse) GetConfigurationOk() (*[]ApiConfiguration, bool) { + if o == nil || IsNil(o.Configuration) { + return nil, false + } + return o.Configuration, true +} + +// HasConfiguration returns a boolean if a field has been set. +func (o *ApiExtensionConfigLoadResponse) HasConfiguration() bool { + if o != nil && !IsNil(o.Configuration) { + return true + } + + return false +} + +// SetConfiguration gets a reference to the given []ApiConfiguration and assigns it to the Configuration field. +func (o *ApiExtensionConfigLoadResponse) SetConfiguration(v *[]ApiConfiguration) { + o.Configuration = v +} + +func (o ApiExtensionConfigLoadResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Configuration) { + toSerialize["configuration"] = o.Configuration + } + return toSerialize, nil +} + +type NullableApiExtensionConfigLoadResponse struct { + value *ApiExtensionConfigLoadResponse + isSet bool +} + +func (v NullableApiExtensionConfigLoadResponse) Get() *ApiExtensionConfigLoadResponse { + return v.value +} + +func (v *NullableApiExtensionConfigLoadResponse) Set(val *ApiExtensionConfigLoadResponse) { + v.value = val + v.isSet = true +} + +func (v NullableApiExtensionConfigLoadResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableApiExtensionConfigLoadResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApiExtensionConfigLoadResponse(val *ApiExtensionConfigLoadResponse) *NullableApiExtensionConfigLoadResponse { + return &NullableApiExtensionConfigLoadResponse{value: val, isSet: true} +} + +func (v NullableApiExtensionConfigLoadResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApiExtensionConfigLoadResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_api_extension_configure_response.go b/services/postgresflex/model_api_extension_configure_response.go index 4baf314fe..322960d9b 100644 --- a/services/postgresflex/model_api_extension_configure_response.go +++ b/services/postgresflex/model_api_extension_configure_response.go @@ -10,8 +10,108 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the ApiExtensionConfigureResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApiExtensionConfigureResponse{} + // ApiExtensionConfigureResponse struct for ApiExtensionConfigureResponse type ApiExtensionConfigureResponse struct { // Returns marshalled JSON of the new configuration of whatever extension is called Configuration *[]ApiConfiguration `json:"configuration,omitempty"` } + +// NewApiExtensionConfigureResponse instantiates a new ApiExtensionConfigureResponse 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 NewApiExtensionConfigureResponse() *ApiExtensionConfigureResponse { + this := ApiExtensionConfigureResponse{} + return &this +} + +// NewApiExtensionConfigureResponseWithDefaults instantiates a new ApiExtensionConfigureResponse 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 NewApiExtensionConfigureResponseWithDefaults() *ApiExtensionConfigureResponse { + this := ApiExtensionConfigureResponse{} + return &this +} + +// GetConfiguration returns the Configuration field value if set, zero value otherwise. +func (o *ApiExtensionConfigureResponse) GetConfiguration() *[]ApiConfiguration { + if o == nil || IsNil(o.Configuration) { + var ret *[]ApiConfiguration + return ret + } + return o.Configuration +} + +// GetConfigurationOk returns a tuple with the Configuration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiExtensionConfigureResponse) GetConfigurationOk() (*[]ApiConfiguration, bool) { + if o == nil || IsNil(o.Configuration) { + return nil, false + } + return o.Configuration, true +} + +// HasConfiguration returns a boolean if a field has been set. +func (o *ApiExtensionConfigureResponse) HasConfiguration() bool { + if o != nil && !IsNil(o.Configuration) { + return true + } + + return false +} + +// SetConfiguration gets a reference to the given []ApiConfiguration and assigns it to the Configuration field. +func (o *ApiExtensionConfigureResponse) SetConfiguration(v *[]ApiConfiguration) { + o.Configuration = v +} + +func (o ApiExtensionConfigureResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Configuration) { + toSerialize["configuration"] = o.Configuration + } + return toSerialize, nil +} + +type NullableApiExtensionConfigureResponse struct { + value *ApiExtensionConfigureResponse + isSet bool +} + +func (v NullableApiExtensionConfigureResponse) Get() *ApiExtensionConfigureResponse { + return v.value +} + +func (v *NullableApiExtensionConfigureResponse) Set(val *ApiExtensionConfigureResponse) { + v.value = val + v.isSet = true +} + +func (v NullableApiExtensionConfigureResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableApiExtensionConfigureResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApiExtensionConfigureResponse(val *ApiExtensionConfigureResponse) *NullableApiExtensionConfigureResponse { + return &NullableApiExtensionConfigureResponse{value: val, isSet: true} +} + +func (v NullableApiExtensionConfigureResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApiExtensionConfigureResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_api_extension_delete_response.go b/services/postgresflex/model_api_extension_delete_response.go index f4c69deeb..a427c61a3 100644 --- a/services/postgresflex/model_api_extension_delete_response.go +++ b/services/postgresflex/model_api_extension_delete_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the ApiExtensionDeleteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApiExtensionDeleteResponse{} + // ApiExtensionDeleteResponse struct for ApiExtensionDeleteResponse type ApiExtensionDeleteResponse struct { IsSucceded *bool `json:"isSucceded,omitempty"` } + +// NewApiExtensionDeleteResponse instantiates a new ApiExtensionDeleteResponse 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 NewApiExtensionDeleteResponse() *ApiExtensionDeleteResponse { + this := ApiExtensionDeleteResponse{} + return &this +} + +// NewApiExtensionDeleteResponseWithDefaults instantiates a new ApiExtensionDeleteResponse 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 NewApiExtensionDeleteResponseWithDefaults() *ApiExtensionDeleteResponse { + this := ApiExtensionDeleteResponse{} + return &this +} + +// GetIsSucceded returns the IsSucceded field value if set, zero value otherwise. +func (o *ApiExtensionDeleteResponse) GetIsSucceded() *bool { + if o == nil || IsNil(o.IsSucceded) { + var ret *bool + return ret + } + return o.IsSucceded +} + +// GetIsSuccededOk returns a tuple with the IsSucceded field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiExtensionDeleteResponse) GetIsSuccededOk() (*bool, bool) { + if o == nil || IsNil(o.IsSucceded) { + return nil, false + } + return o.IsSucceded, true +} + +// HasIsSucceded returns a boolean if a field has been set. +func (o *ApiExtensionDeleteResponse) HasIsSucceded() bool { + if o != nil && !IsNil(o.IsSucceded) { + return true + } + + return false +} + +// SetIsSucceded gets a reference to the given bool and assigns it to the IsSucceded field. +func (o *ApiExtensionDeleteResponse) SetIsSucceded(v *bool) { + o.IsSucceded = v +} + +func (o ApiExtensionDeleteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.IsSucceded) { + toSerialize["isSucceded"] = o.IsSucceded + } + return toSerialize, nil +} + +type NullableApiExtensionDeleteResponse struct { + value *ApiExtensionDeleteResponse + isSet bool +} + +func (v NullableApiExtensionDeleteResponse) Get() *ApiExtensionDeleteResponse { + return v.value +} + +func (v *NullableApiExtensionDeleteResponse) Set(val *ApiExtensionDeleteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableApiExtensionDeleteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableApiExtensionDeleteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApiExtensionDeleteResponse(val *ApiExtensionDeleteResponse) *NullableApiExtensionDeleteResponse { + return &NullableApiExtensionDeleteResponse{value: val, isSet: true} +} + +func (v NullableApiExtensionDeleteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApiExtensionDeleteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_api_extension_list.go b/services/postgresflex/model_api_extension_list.go index de4811cae..9056ff299 100644 --- a/services/postgresflex/model_api_extension_list.go +++ b/services/postgresflex/model_api_extension_list.go @@ -10,9 +10,179 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the ApiExtensionList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApiExtensionList{} + // ApiExtensionList struct for ApiExtensionList type ApiExtensionList struct { ID *int64 `json:"ID,omitempty"` Description *string `json:"description,omitempty"` Name *string `json:"name,omitempty"` } + +// NewApiExtensionList instantiates a new ApiExtensionList 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 NewApiExtensionList() *ApiExtensionList { + this := ApiExtensionList{} + return &this +} + +// NewApiExtensionListWithDefaults instantiates a new ApiExtensionList 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 NewApiExtensionListWithDefaults() *ApiExtensionList { + this := ApiExtensionList{} + return &this +} + +// GetID returns the ID field value if set, zero value otherwise. +func (o *ApiExtensionList) GetID() *int64 { + if o == nil || IsNil(o.ID) { + var ret *int64 + return ret + } + return o.ID +} + +// GetIDOk returns a tuple with the ID field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiExtensionList) GetIDOk() (*int64, bool) { + if o == nil || IsNil(o.ID) { + return nil, false + } + return o.ID, true +} + +// HasID returns a boolean if a field has been set. +func (o *ApiExtensionList) HasID() bool { + if o != nil && !IsNil(o.ID) { + return true + } + + return false +} + +// SetID gets a reference to the given int64 and assigns it to the ID field. +func (o *ApiExtensionList) SetID(v *int64) { + o.ID = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ApiExtensionList) GetDescription() *string { + if o == nil || IsNil(o.Description) { + var ret *string + return ret + } + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiExtensionList) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ApiExtensionList) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ApiExtensionList) SetDescription(v *string) { + o.Description = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ApiExtensionList) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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 *ApiExtensionList) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ApiExtensionList) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ApiExtensionList) SetName(v *string) { + o.Name = v +} + +func (o ApiExtensionList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ID) { + toSerialize["ID"] = o.ID + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +type NullableApiExtensionList struct { + value *ApiExtensionList + isSet bool +} + +func (v NullableApiExtensionList) Get() *ApiExtensionList { + return v.value +} + +func (v *NullableApiExtensionList) Set(val *ApiExtensionList) { + v.value = val + v.isSet = true +} + +func (v NullableApiExtensionList) IsSet() bool { + return v.isSet +} + +func (v *NullableApiExtensionList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApiExtensionList(val *ApiExtensionList) *NullableApiExtensionList { + return &NullableApiExtensionList{value: val, isSet: true} +} + +func (v NullableApiExtensionList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApiExtensionList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_api_extension_load_response.go b/services/postgresflex/model_api_extension_load_response.go index 73bf45e60..e88fc621c 100644 --- a/services/postgresflex/model_api_extension_load_response.go +++ b/services/postgresflex/model_api_extension_load_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the ApiExtensionLoadResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApiExtensionLoadResponse{} + // ApiExtensionLoadResponse struct for ApiExtensionLoadResponse type ApiExtensionLoadResponse struct { Extension *ApiExtensionList `json:"extension,omitempty"` } + +// NewApiExtensionLoadResponse instantiates a new ApiExtensionLoadResponse 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 NewApiExtensionLoadResponse() *ApiExtensionLoadResponse { + this := ApiExtensionLoadResponse{} + return &this +} + +// NewApiExtensionLoadResponseWithDefaults instantiates a new ApiExtensionLoadResponse 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 NewApiExtensionLoadResponseWithDefaults() *ApiExtensionLoadResponse { + this := ApiExtensionLoadResponse{} + return &this +} + +// GetExtension returns the Extension field value if set, zero value otherwise. +func (o *ApiExtensionLoadResponse) GetExtension() *ApiExtensionList { + if o == nil || IsNil(o.Extension) { + var ret *ApiExtensionList + return ret + } + return o.Extension +} + +// GetExtensionOk returns a tuple with the Extension field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiExtensionLoadResponse) GetExtensionOk() (*ApiExtensionList, bool) { + if o == nil || IsNil(o.Extension) { + return nil, false + } + return o.Extension, true +} + +// HasExtension returns a boolean if a field has been set. +func (o *ApiExtensionLoadResponse) HasExtension() bool { + if o != nil && !IsNil(o.Extension) { + return true + } + + return false +} + +// SetExtension gets a reference to the given ApiExtensionList and assigns it to the Extension field. +func (o *ApiExtensionLoadResponse) SetExtension(v *ApiExtensionList) { + o.Extension = v +} + +func (o ApiExtensionLoadResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Extension) { + toSerialize["extension"] = o.Extension + } + return toSerialize, nil +} + +type NullableApiExtensionLoadResponse struct { + value *ApiExtensionLoadResponse + isSet bool +} + +func (v NullableApiExtensionLoadResponse) Get() *ApiExtensionLoadResponse { + return v.value +} + +func (v *NullableApiExtensionLoadResponse) Set(val *ApiExtensionLoadResponse) { + v.value = val + v.isSet = true +} + +func (v NullableApiExtensionLoadResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableApiExtensionLoadResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApiExtensionLoadResponse(val *ApiExtensionLoadResponse) *NullableApiExtensionLoadResponse { + return &NullableApiExtensionLoadResponse{value: val, isSet: true} +} + +func (v NullableApiExtensionLoadResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApiExtensionLoadResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_api_install_response.go b/services/postgresflex/model_api_install_response.go index 7f59156b3..3c419d2be 100644 --- a/services/postgresflex/model_api_install_response.go +++ b/services/postgresflex/model_api_install_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the ApiInstallResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApiInstallResponse{} + // ApiInstallResponse struct for ApiInstallResponse type ApiInstallResponse struct { Extension *ApiExtensionList `json:"extension,omitempty"` } + +// NewApiInstallResponse instantiates a new ApiInstallResponse 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 NewApiInstallResponse() *ApiInstallResponse { + this := ApiInstallResponse{} + return &this +} + +// NewApiInstallResponseWithDefaults instantiates a new ApiInstallResponse 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 NewApiInstallResponseWithDefaults() *ApiInstallResponse { + this := ApiInstallResponse{} + return &this +} + +// GetExtension returns the Extension field value if set, zero value otherwise. +func (o *ApiInstallResponse) GetExtension() *ApiExtensionList { + if o == nil || IsNil(o.Extension) { + var ret *ApiExtensionList + return ret + } + return o.Extension +} + +// GetExtensionOk returns a tuple with the Extension field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiInstallResponse) GetExtensionOk() (*ApiExtensionList, bool) { + if o == nil || IsNil(o.Extension) { + return nil, false + } + return o.Extension, true +} + +// HasExtension returns a boolean if a field has been set. +func (o *ApiInstallResponse) HasExtension() bool { + if o != nil && !IsNil(o.Extension) { + return true + } + + return false +} + +// SetExtension gets a reference to the given ApiExtensionList and assigns it to the Extension field. +func (o *ApiInstallResponse) SetExtension(v *ApiExtensionList) { + o.Extension = v +} + +func (o ApiInstallResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Extension) { + toSerialize["extension"] = o.Extension + } + return toSerialize, nil +} + +type NullableApiInstallResponse struct { + value *ApiInstallResponse + isSet bool +} + +func (v NullableApiInstallResponse) Get() *ApiInstallResponse { + return v.value +} + +func (v *NullableApiInstallResponse) Set(val *ApiInstallResponse) { + v.value = val + v.isSet = true +} + +func (v NullableApiInstallResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableApiInstallResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApiInstallResponse(val *ApiInstallResponse) *NullableApiInstallResponse { + return &NullableApiInstallResponse{value: val, isSet: true} +} + +func (v NullableApiInstallResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApiInstallResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_api_installed_list_response.go b/services/postgresflex/model_api_installed_list_response.go index 478543822..6efea3d65 100644 --- a/services/postgresflex/model_api_installed_list_response.go +++ b/services/postgresflex/model_api_installed_list_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the ApiInstalledListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApiInstalledListResponse{} + // ApiInstalledListResponse struct for ApiInstalledListResponse type ApiInstalledListResponse struct { Installed *[]ApiExtensionList `json:"installed,omitempty"` } + +// NewApiInstalledListResponse instantiates a new ApiInstalledListResponse 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 NewApiInstalledListResponse() *ApiInstalledListResponse { + this := ApiInstalledListResponse{} + return &this +} + +// NewApiInstalledListResponseWithDefaults instantiates a new ApiInstalledListResponse 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 NewApiInstalledListResponseWithDefaults() *ApiInstalledListResponse { + this := ApiInstalledListResponse{} + return &this +} + +// GetInstalled returns the Installed field value if set, zero value otherwise. +func (o *ApiInstalledListResponse) GetInstalled() *[]ApiExtensionList { + if o == nil || IsNil(o.Installed) { + var ret *[]ApiExtensionList + return ret + } + return o.Installed +} + +// GetInstalledOk returns a tuple with the Installed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiInstalledListResponse) GetInstalledOk() (*[]ApiExtensionList, bool) { + if o == nil || IsNil(o.Installed) { + return nil, false + } + return o.Installed, true +} + +// HasInstalled returns a boolean if a field has been set. +func (o *ApiInstalledListResponse) HasInstalled() bool { + if o != nil && !IsNil(o.Installed) { + return true + } + + return false +} + +// SetInstalled gets a reference to the given []ApiExtensionList and assigns it to the Installed field. +func (o *ApiInstalledListResponse) SetInstalled(v *[]ApiExtensionList) { + o.Installed = v +} + +func (o ApiInstalledListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Installed) { + toSerialize["installed"] = o.Installed + } + return toSerialize, nil +} + +type NullableApiInstalledListResponse struct { + value *ApiInstalledListResponse + isSet bool +} + +func (v NullableApiInstalledListResponse) Get() *ApiInstalledListResponse { + return v.value +} + +func (v *NullableApiInstalledListResponse) Set(val *ApiInstalledListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableApiInstalledListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableApiInstalledListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApiInstalledListResponse(val *ApiInstalledListResponse) *NullableApiInstalledListResponse { + return &NullableApiInstalledListResponse{value: val, isSet: true} +} + +func (v NullableApiInstalledListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApiInstalledListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_backup.go b/services/postgresflex/model_backup.go index e0f6708cc..ed4a5757a 100644 --- a/services/postgresflex/model_backup.go +++ b/services/postgresflex/model_backup.go @@ -10,6 +10,13 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the Backup type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Backup{} + // Backup struct for Backup type Backup struct { EndTime *string `json:"endTime,omitempty"` @@ -21,3 +28,341 @@ type Backup struct { Size *int64 `json:"size,omitempty"` StartTime *string `json:"startTime,omitempty"` } + +// NewBackup instantiates a new Backup 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 NewBackup() *Backup { + this := Backup{} + return &this +} + +// NewBackupWithDefaults instantiates a new Backup 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 NewBackupWithDefaults() *Backup { + this := Backup{} + return &this +} + +// GetEndTime returns the EndTime field value if set, zero value otherwise. +func (o *Backup) GetEndTime() *string { + if o == nil || IsNil(o.EndTime) { + var ret *string + return ret + } + return o.EndTime +} + +// GetEndTimeOk returns a tuple with the EndTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Backup) GetEndTimeOk() (*string, bool) { + if o == nil || IsNil(o.EndTime) { + return nil, false + } + return o.EndTime, true +} + +// HasEndTime returns a boolean if a field has been set. +func (o *Backup) HasEndTime() bool { + if o != nil && !IsNil(o.EndTime) { + return true + } + + return false +} + +// SetEndTime gets a reference to the given string and assigns it to the EndTime field. +func (o *Backup) SetEndTime(v *string) { + o.EndTime = v +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *Backup) GetError() *string { + if o == nil || IsNil(o.Error) { + var ret *string + return ret + } + return o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Backup) GetErrorOk() (*string, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *Backup) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given string and assigns it to the Error field. +func (o *Backup) SetError(v *string) { + o.Error = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Backup) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + return ret + } + return o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Backup) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Backup) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Backup) SetId(v *string) { + o.Id = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *Backup) GetLabels() *[]string { + if o == nil || IsNil(o.Labels) { + var ret *[]string + return ret + } + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Backup) GetLabelsOk() (*[]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *Backup) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given []string and assigns it to the Labels field. +func (o *Backup) SetLabels(v *[]string) { + o.Labels = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Backup) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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 *Backup) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Backup) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Backup) SetName(v *string) { + o.Name = v +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *Backup) GetOptions() *map[string]string { + if o == nil || IsNil(o.Options) { + var ret *map[string]string + return ret + } + return o.Options +} + +// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Backup) GetOptionsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Options) { + return nil, false + } + return o.Options, true +} + +// HasOptions returns a boolean if a field has been set. +func (o *Backup) HasOptions() bool { + if o != nil && !IsNil(o.Options) { + return true + } + + return false +} + +// SetOptions gets a reference to the given map[string]string and assigns it to the Options field. +func (o *Backup) SetOptions(v *map[string]string) { + o.Options = v +} + +// GetSize returns the Size field value if set, zero value otherwise. +func (o *Backup) GetSize() *int64 { + if o == nil || IsNil(o.Size) { + var ret *int64 + return ret + } + return o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Backup) GetSizeOk() (*int64, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *Backup) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given int64 and assigns it to the Size field. +func (o *Backup) SetSize(v *int64) { + o.Size = v +} + +// GetStartTime returns the StartTime field value if set, zero value otherwise. +func (o *Backup) GetStartTime() *string { + if o == nil || IsNil(o.StartTime) { + var ret *string + return ret + } + return o.StartTime +} + +// GetStartTimeOk returns a tuple with the StartTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Backup) GetStartTimeOk() (*string, bool) { + if o == nil || IsNil(o.StartTime) { + return nil, false + } + return o.StartTime, true +} + +// HasStartTime returns a boolean if a field has been set. +func (o *Backup) HasStartTime() bool { + if o != nil && !IsNil(o.StartTime) { + return true + } + + return false +} + +// SetStartTime gets a reference to the given string and assigns it to the StartTime field. +func (o *Backup) SetStartTime(v *string) { + o.StartTime = v +} + +func (o Backup) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.EndTime) { + toSerialize["endTime"] = o.EndTime + } + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Options) { + toSerialize["options"] = o.Options + } + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } + if !IsNil(o.StartTime) { + toSerialize["startTime"] = o.StartTime + } + return toSerialize, nil +} + +type NullableBackup struct { + value *Backup + isSet bool +} + +func (v NullableBackup) Get() *Backup { + return v.value +} + +func (v *NullableBackup) Set(val *Backup) { + v.value = val + v.isSet = true +} + +func (v NullableBackup) IsSet() bool { + return v.isSet +} + +func (v *NullableBackup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBackup(val *Backup) *NullableBackup { + return &NullableBackup{value: val, isSet: true} +} + +func (v NullableBackup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBackup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_clone_instance_payload.go b/services/postgresflex/model_clone_instance_payload.go index 7b299af1d..1aa6d9f57 100644 --- a/services/postgresflex/model_clone_instance_payload.go +++ b/services/postgresflex/model_clone_instance_payload.go @@ -10,6 +10,13 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the CloneInstancePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CloneInstancePayload{} + // CloneInstancePayload struct for CloneInstancePayload type CloneInstancePayload struct { Class *string `json:"class,omitempty"` @@ -17,3 +24,166 @@ type CloneInstancePayload struct { // The timestamp should be specified in UTC time following the format provided in the example. Timestamp *string `json:"timestamp,omitempty"` } + +// NewCloneInstancePayload instantiates a new CloneInstancePayload 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 NewCloneInstancePayload() *CloneInstancePayload { + this := CloneInstancePayload{} + return &this +} + +// NewCloneInstancePayloadWithDefaults instantiates a new CloneInstancePayload 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 NewCloneInstancePayloadWithDefaults() *CloneInstancePayload { + this := CloneInstancePayload{} + return &this +} + +// GetClass returns the Class field value if set, zero value otherwise. +func (o *CloneInstancePayload) GetClass() *string { + if o == nil || IsNil(o.Class) { + var ret *string + return ret + } + return o.Class +} + +// GetClassOk returns a tuple with the Class field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CloneInstancePayload) GetClassOk() (*string, bool) { + if o == nil || IsNil(o.Class) { + return nil, false + } + return o.Class, true +} + +// HasClass returns a boolean if a field has been set. +func (o *CloneInstancePayload) HasClass() bool { + if o != nil && !IsNil(o.Class) { + return true + } + + return false +} + +// SetClass gets a reference to the given string and assigns it to the Class field. +func (o *CloneInstancePayload) SetClass(v *string) { + o.Class = v +} + +// GetSize returns the Size field value if set, zero value otherwise. +func (o *CloneInstancePayload) GetSize() *int64 { + if o == nil || IsNil(o.Size) { + var ret *int64 + return ret + } + return o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CloneInstancePayload) GetSizeOk() (*int64, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *CloneInstancePayload) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given int64 and assigns it to the Size field. +func (o *CloneInstancePayload) SetSize(v *int64) { + o.Size = v +} + +// GetTimestamp returns the Timestamp field value if set, zero value otherwise. +func (o *CloneInstancePayload) GetTimestamp() *string { + if o == nil || IsNil(o.Timestamp) { + var ret *string + return ret + } + return o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CloneInstancePayload) GetTimestampOk() (*string, bool) { + if o == nil || IsNil(o.Timestamp) { + return nil, false + } + return o.Timestamp, true +} + +// HasTimestamp returns a boolean if a field has been set. +func (o *CloneInstancePayload) HasTimestamp() bool { + if o != nil && !IsNil(o.Timestamp) { + return true + } + + return false +} + +// SetTimestamp gets a reference to the given string and assigns it to the Timestamp field. +func (o *CloneInstancePayload) SetTimestamp(v *string) { + o.Timestamp = v +} + +func (o CloneInstancePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Class) { + toSerialize["class"] = o.Class + } + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } + if !IsNil(o.Timestamp) { + toSerialize["timestamp"] = o.Timestamp + } + return toSerialize, nil +} + +type NullableCloneInstancePayload struct { + value *CloneInstancePayload + isSet bool +} + +func (v NullableCloneInstancePayload) Get() *CloneInstancePayload { + return v.value +} + +func (v *NullableCloneInstancePayload) Set(val *CloneInstancePayload) { + v.value = val + v.isSet = true +} + +func (v NullableCloneInstancePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCloneInstancePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCloneInstancePayload(val *CloneInstancePayload) *NullableCloneInstancePayload { + return &NullableCloneInstancePayload{value: val, isSet: true} +} + +func (v NullableCloneInstancePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCloneInstancePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_clone_instance_response.go b/services/postgresflex/model_clone_instance_response.go index 0797c167b..d8c805cd9 100644 --- a/services/postgresflex/model_clone_instance_response.go +++ b/services/postgresflex/model_clone_instance_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the CloneInstanceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CloneInstanceResponse{} + // CloneInstanceResponse struct for CloneInstanceResponse type CloneInstanceResponse struct { InstanceId *string `json:"instanceId,omitempty"` } + +// NewCloneInstanceResponse instantiates a new CloneInstanceResponse 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 NewCloneInstanceResponse() *CloneInstanceResponse { + this := CloneInstanceResponse{} + return &this +} + +// NewCloneInstanceResponseWithDefaults instantiates a new CloneInstanceResponse 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 NewCloneInstanceResponseWithDefaults() *CloneInstanceResponse { + this := CloneInstanceResponse{} + return &this +} + +// GetInstanceId returns the InstanceId field value if set, zero value otherwise. +func (o *CloneInstanceResponse) GetInstanceId() *string { + if o == nil || IsNil(o.InstanceId) { + var ret *string + return ret + } + return o.InstanceId +} + +// GetInstanceIdOk returns a tuple with the InstanceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CloneInstanceResponse) GetInstanceIdOk() (*string, bool) { + if o == nil || IsNil(o.InstanceId) { + return nil, false + } + return o.InstanceId, true +} + +// HasInstanceId returns a boolean if a field has been set. +func (o *CloneInstanceResponse) HasInstanceId() bool { + if o != nil && !IsNil(o.InstanceId) { + return true + } + + return false +} + +// SetInstanceId gets a reference to the given string and assigns it to the InstanceId field. +func (o *CloneInstanceResponse) SetInstanceId(v *string) { + o.InstanceId = v +} + +func (o CloneInstanceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.InstanceId) { + toSerialize["instanceId"] = o.InstanceId + } + return toSerialize, nil +} + +type NullableCloneInstanceResponse struct { + value *CloneInstanceResponse + isSet bool +} + +func (v NullableCloneInstanceResponse) Get() *CloneInstanceResponse { + return v.value +} + +func (v *NullableCloneInstanceResponse) Set(val *CloneInstanceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCloneInstanceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCloneInstanceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCloneInstanceResponse(val *CloneInstanceResponse) *NullableCloneInstanceResponse { + return &NullableCloneInstanceResponse{value: val, isSet: true} +} + +func (v NullableCloneInstanceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCloneInstanceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_create_database_payload.go b/services/postgresflex/model_create_database_payload.go index d2a977232..ee897e421 100644 --- a/services/postgresflex/model_create_database_payload.go +++ b/services/postgresflex/model_create_database_payload.go @@ -10,9 +10,144 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the CreateDatabasePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateDatabasePayload{} + // CreateDatabasePayload struct for CreateDatabasePayload type CreateDatabasePayload struct { Name *string `json:"name,omitempty"` // Database specific options Options *map[string]string `json:"options,omitempty"` } + +// NewCreateDatabasePayload instantiates a new CreateDatabasePayload 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 NewCreateDatabasePayload() *CreateDatabasePayload { + this := CreateDatabasePayload{} + return &this +} + +// NewCreateDatabasePayloadWithDefaults instantiates a new CreateDatabasePayload 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 NewCreateDatabasePayloadWithDefaults() *CreateDatabasePayload { + this := CreateDatabasePayload{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CreateDatabasePayload) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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 *CreateDatabasePayload) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *CreateDatabasePayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *CreateDatabasePayload) SetName(v *string) { + o.Name = v +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *CreateDatabasePayload) GetOptions() *map[string]string { + if o == nil || IsNil(o.Options) { + var ret *map[string]string + return ret + } + return o.Options +} + +// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateDatabasePayload) GetOptionsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Options) { + return nil, false + } + return o.Options, true +} + +// HasOptions returns a boolean if a field has been set. +func (o *CreateDatabasePayload) HasOptions() bool { + if o != nil && !IsNil(o.Options) { + return true + } + + return false +} + +// SetOptions gets a reference to the given map[string]string and assigns it to the Options field. +func (o *CreateDatabasePayload) SetOptions(v *map[string]string) { + o.Options = v +} + +func (o CreateDatabasePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Options) { + toSerialize["options"] = o.Options + } + return toSerialize, nil +} + +type NullableCreateDatabasePayload struct { + value *CreateDatabasePayload + isSet bool +} + +func (v NullableCreateDatabasePayload) Get() *CreateDatabasePayload { + return v.value +} + +func (v *NullableCreateDatabasePayload) Set(val *CreateDatabasePayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateDatabasePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateDatabasePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateDatabasePayload(val *CreateDatabasePayload) *NullableCreateDatabasePayload { + return &NullableCreateDatabasePayload{value: val, isSet: true} +} + +func (v NullableCreateDatabasePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateDatabasePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_create_instance_payload.go b/services/postgresflex/model_create_instance_payload.go index df127d4f0..8c2508be7 100644 --- a/services/postgresflex/model_create_instance_payload.go +++ b/services/postgresflex/model_create_instance_payload.go @@ -10,6 +10,13 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the CreateInstancePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateInstancePayload{} + // CreateInstancePayload struct for CreateInstancePayload type CreateInstancePayload struct { // REQUIRED @@ -31,3 +38,306 @@ type CreateInstancePayload struct { // REQUIRED Version *string `json:"version"` } + +type _CreateInstancePayload CreateInstancePayload + +// NewCreateInstancePayload instantiates a new CreateInstancePayload 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 NewCreateInstancePayload(acl *ACL, backupSchedule *string, flavorId *string, name *string, options *map[string]string, replicas *int64, storage *Storage, version *string) *CreateInstancePayload { + this := CreateInstancePayload{} + this.Acl = acl + this.BackupSchedule = backupSchedule + this.FlavorId = flavorId + this.Name = name + this.Options = options + this.Replicas = replicas + this.Storage = storage + this.Version = version + return &this +} + +// NewCreateInstancePayloadWithDefaults instantiates a new CreateInstancePayload 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 NewCreateInstancePayloadWithDefaults() *CreateInstancePayload { + this := CreateInstancePayload{} + return &this +} + +// GetAcl returns the Acl field value +func (o *CreateInstancePayload) GetAcl() *ACL { + if o == nil { + var ret *ACL + return ret + } + + return o.Acl +} + +// GetAclOk returns a tuple with the Acl field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetAclOk() (*ACL, bool) { + if o == nil { + return nil, false + } + return o.Acl, true +} + +// SetAcl sets field value +func (o *CreateInstancePayload) SetAcl(v *ACL) { + o.Acl = v +} + +// GetBackupSchedule returns the BackupSchedule field value +func (o *CreateInstancePayload) GetBackupSchedule() *string { + if o == nil { + var ret *string + return ret + } + + return o.BackupSchedule +} + +// GetBackupScheduleOk returns a tuple with the BackupSchedule field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetBackupScheduleOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.BackupSchedule, true +} + +// SetBackupSchedule sets field value +func (o *CreateInstancePayload) SetBackupSchedule(v *string) { + o.BackupSchedule = v +} + +// GetFlavorId returns the FlavorId field value +func (o *CreateInstancePayload) GetFlavorId() *string { + if o == nil { + var ret *string + return ret + } + + return o.FlavorId +} + +// GetFlavorIdOk returns a tuple with the FlavorId field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetFlavorIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.FlavorId, true +} + +// SetFlavorId sets field value +func (o *CreateInstancePayload) SetFlavorId(v *string) { + o.FlavorId = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *CreateInstancePayload) GetLabels() *map[string]string { + if o == nil || IsNil(o.Labels) { + var ret *map[string]string + return ret + } + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *CreateInstancePayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *CreateInstancePayload) SetLabels(v *map[string]string) { + o.Labels = v +} + +// GetName returns the Name field value +func (o *CreateInstancePayload) GetName() *string { + if o == nil { + var ret *string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name, true +} + +// SetName sets field value +func (o *CreateInstancePayload) SetName(v *string) { + o.Name = v +} + +// GetOptions returns the Options field value +func (o *CreateInstancePayload) GetOptions() *map[string]string { + if o == nil { + var ret *map[string]string + return ret + } + + return o.Options +} + +// GetOptionsOk returns a tuple with the Options field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetOptionsOk() (*map[string]string, bool) { + if o == nil { + return nil, false + } + return o.Options, true +} + +// SetOptions sets field value +func (o *CreateInstancePayload) SetOptions(v *map[string]string) { + o.Options = v +} + +// GetReplicas returns the Replicas field value +func (o *CreateInstancePayload) GetReplicas() *int64 { + if o == nil { + var ret *int64 + return ret + } + + return o.Replicas +} + +// GetReplicasOk returns a tuple with the Replicas field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetReplicasOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.Replicas, true +} + +// SetReplicas sets field value +func (o *CreateInstancePayload) SetReplicas(v *int64) { + o.Replicas = v +} + +// GetStorage returns the Storage field value +func (o *CreateInstancePayload) GetStorage() *Storage { + if o == nil { + var ret *Storage + return ret + } + + return o.Storage +} + +// GetStorageOk returns a tuple with the Storage field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetStorageOk() (*Storage, bool) { + if o == nil { + return nil, false + } + return o.Storage, true +} + +// SetStorage sets field value +func (o *CreateInstancePayload) SetStorage(v *Storage) { + o.Storage = v +} + +// GetVersion returns the Version field value +func (o *CreateInstancePayload) GetVersion() *string { + if o == nil { + var ret *string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Version, true +} + +// SetVersion sets field value +func (o *CreateInstancePayload) SetVersion(v *string) { + o.Version = v +} + +func (o CreateInstancePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["acl"] = o.Acl + toSerialize["backupSchedule"] = o.BackupSchedule + toSerialize["flavorId"] = o.FlavorId + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + toSerialize["name"] = o.Name + toSerialize["options"] = o.Options + toSerialize["replicas"] = o.Replicas + toSerialize["storage"] = o.Storage + toSerialize["version"] = o.Version + return toSerialize, nil +} + +type NullableCreateInstancePayload struct { + value *CreateInstancePayload + isSet bool +} + +func (v NullableCreateInstancePayload) Get() *CreateInstancePayload { + return v.value +} + +func (v *NullableCreateInstancePayload) Set(val *CreateInstancePayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateInstancePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateInstancePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateInstancePayload(val *CreateInstancePayload) *NullableCreateInstancePayload { + return &NullableCreateInstancePayload{value: val, isSet: true} +} + +func (v NullableCreateInstancePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateInstancePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_create_instance_response.go b/services/postgresflex/model_create_instance_response.go index 1f505920c..5c32261af 100644 --- a/services/postgresflex/model_create_instance_response.go +++ b/services/postgresflex/model_create_instance_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the CreateInstanceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateInstanceResponse{} + // CreateInstanceResponse struct for CreateInstanceResponse type CreateInstanceResponse struct { Id *string `json:"id,omitempty"` } + +// NewCreateInstanceResponse instantiates a new CreateInstanceResponse 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 NewCreateInstanceResponse() *CreateInstanceResponse { + this := CreateInstanceResponse{} + return &this +} + +// NewCreateInstanceResponseWithDefaults instantiates a new CreateInstanceResponse 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 NewCreateInstanceResponseWithDefaults() *CreateInstanceResponse { + this := CreateInstanceResponse{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CreateInstanceResponse) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + return ret + } + return o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateInstanceResponse) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *CreateInstanceResponse) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *CreateInstanceResponse) SetId(v *string) { + o.Id = v +} + +func (o CreateInstanceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + return toSerialize, nil +} + +type NullableCreateInstanceResponse struct { + value *CreateInstanceResponse + isSet bool +} + +func (v NullableCreateInstanceResponse) Get() *CreateInstanceResponse { + return v.value +} + +func (v *NullableCreateInstanceResponse) Set(val *CreateInstanceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateInstanceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateInstanceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateInstanceResponse(val *CreateInstanceResponse) *NullableCreateInstanceResponse { + return &NullableCreateInstanceResponse{value: val, isSet: true} +} + +func (v NullableCreateInstanceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateInstanceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_create_user_payload.go b/services/postgresflex/model_create_user_payload.go index 29289540e..a44698b19 100644 --- a/services/postgresflex/model_create_user_payload.go +++ b/services/postgresflex/model_create_user_payload.go @@ -10,8 +10,143 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the CreateUserPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateUserPayload{} + // CreateUserPayload struct for CreateUserPayload type CreateUserPayload struct { Roles *[]string `json:"roles,omitempty"` Username *string `json:"username,omitempty"` } + +// NewCreateUserPayload instantiates a new CreateUserPayload 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 NewCreateUserPayload() *CreateUserPayload { + this := CreateUserPayload{} + return &this +} + +// NewCreateUserPayloadWithDefaults instantiates a new CreateUserPayload 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 NewCreateUserPayloadWithDefaults() *CreateUserPayload { + this := CreateUserPayload{} + return &this +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *CreateUserPayload) GetRoles() *[]string { + if o == nil || IsNil(o.Roles) { + var ret *[]string + return ret + } + return o.Roles +} + +// 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 *CreateUserPayload) GetRolesOk() (*[]string, bool) { + if o == nil || IsNil(o.Roles) { + return nil, false + } + return o.Roles, true +} + +// HasRoles returns a boolean if a field has been set. +func (o *CreateUserPayload) HasRoles() bool { + if o != nil && !IsNil(o.Roles) { + return true + } + + return false +} + +// SetRoles gets a reference to the given []string and assigns it to the Roles field. +func (o *CreateUserPayload) SetRoles(v *[]string) { + o.Roles = v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *CreateUserPayload) GetUsername() *string { + if o == nil || IsNil(o.Username) { + var ret *string + return ret + } + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateUserPayload) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *CreateUserPayload) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *CreateUserPayload) SetUsername(v *string) { + o.Username = v +} + +func (o CreateUserPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Roles) { + toSerialize["roles"] = o.Roles + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +type NullableCreateUserPayload struct { + value *CreateUserPayload + isSet bool +} + +func (v NullableCreateUserPayload) Get() *CreateUserPayload { + return v.value +} + +func (v *NullableCreateUserPayload) Set(val *CreateUserPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateUserPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateUserPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateUserPayload(val *CreateUserPayload) *NullableCreateUserPayload { + return &NullableCreateUserPayload{value: val, isSet: true} +} + +func (v NullableCreateUserPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateUserPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_create_user_response.go b/services/postgresflex/model_create_user_response.go index e4fb6e856..803acac2c 100644 --- a/services/postgresflex/model_create_user_response.go +++ b/services/postgresflex/model_create_user_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the CreateUserResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateUserResponse{} + // CreateUserResponse struct for CreateUserResponse type CreateUserResponse struct { Item *User `json:"item,omitempty"` } + +// NewCreateUserResponse instantiates a new CreateUserResponse 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 NewCreateUserResponse() *CreateUserResponse { + this := CreateUserResponse{} + return &this +} + +// NewCreateUserResponseWithDefaults instantiates a new CreateUserResponse 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 NewCreateUserResponseWithDefaults() *CreateUserResponse { + this := CreateUserResponse{} + return &this +} + +// GetItem returns the Item field value if set, zero value otherwise. +func (o *CreateUserResponse) GetItem() *User { + if o == nil || IsNil(o.Item) { + var ret *User + return ret + } + return o.Item +} + +// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateUserResponse) GetItemOk() (*User, bool) { + if o == nil || IsNil(o.Item) { + return nil, false + } + return o.Item, true +} + +// HasItem returns a boolean if a field has been set. +func (o *CreateUserResponse) HasItem() bool { + if o != nil && !IsNil(o.Item) { + return true + } + + return false +} + +// SetItem gets a reference to the given User and assigns it to the Item field. +func (o *CreateUserResponse) SetItem(v *User) { + o.Item = v +} + +func (o CreateUserResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Item) { + toSerialize["item"] = o.Item + } + return toSerialize, nil +} + +type NullableCreateUserResponse struct { + value *CreateUserResponse + isSet bool +} + +func (v NullableCreateUserResponse) Get() *CreateUserResponse { + return v.value +} + +func (v *NullableCreateUserResponse) Set(val *CreateUserResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateUserResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateUserResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateUserResponse(val *CreateUserResponse) *NullableCreateUserResponse { + return &NullableCreateUserResponse{value: val, isSet: true} +} + +func (v NullableCreateUserResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateUserResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_error.go b/services/postgresflex/model_error.go index 3bd0722f5..8199f09ae 100644 --- a/services/postgresflex/model_error.go +++ b/services/postgresflex/model_error.go @@ -10,6 +10,13 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the Error type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Error{} + // Error struct for Error type Error struct { Code *int64 `json:"code,omitempty"` @@ -17,3 +24,201 @@ type Error struct { Message *string `json:"message,omitempty"` Type *string `json:"type,omitempty"` } + +// NewError instantiates a new Error 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 NewError() *Error { + this := Error{} + return &this +} + +// NewErrorWithDefaults instantiates a new Error 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 NewErrorWithDefaults() *Error { + this := Error{} + return &this +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *Error) GetCode() *int64 { + if o == nil || IsNil(o.Code) { + var ret *int64 + return ret + } + return o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Error) GetCodeOk() (*int64, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *Error) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given int64 and assigns it to the Code field. +func (o *Error) SetCode(v *int64) { + o.Code = v +} + +// GetFields returns the Fields field value if set, zero value otherwise. +func (o *Error) GetFields() *map[string][]string { + if o == nil || IsNil(o.Fields) { + var ret *map[string][]string + return ret + } + return o.Fields +} + +// GetFieldsOk returns a tuple with the Fields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Error) GetFieldsOk() (*map[string][]string, bool) { + if o == nil || IsNil(o.Fields) { + return nil, false + } + return o.Fields, true +} + +// HasFields returns a boolean if a field has been set. +func (o *Error) HasFields() bool { + if o != nil && !IsNil(o.Fields) { + return true + } + + return false +} + +// SetFields gets a reference to the given map[string][]string and assigns it to the Fields field. +func (o *Error) SetFields(v *map[string][]string) { + o.Fields = v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *Error) GetMessage() *string { + if o == nil || IsNil(o.Message) { + var ret *string + return ret + } + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Error) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *Error) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *Error) SetMessage(v *string) { + o.Message = v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *Error) GetType() *string { + if o == nil || IsNil(o.Type) { + var ret *string + return ret + } + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Error) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *Error) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *Error) SetType(v *string) { + o.Type = v +} + +func (o Error) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Fields) { + toSerialize["fields"] = o.Fields + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableError struct { + value *Error + isSet bool +} + +func (v NullableError) Get() *Error { + return v.value +} + +func (v *NullableError) Set(val *Error) { + v.value = val + v.isSet = true +} + +func (v NullableError) IsSet() bool { + return v.isSet +} + +func (v *NullableError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableError(val *Error) *NullableError { + return &NullableError{value: val, isSet: true} +} + +func (v NullableError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_extensions_configuration.go b/services/postgresflex/model_extensions_configuration.go index c7261d5ac..e1ae619f9 100644 --- a/services/postgresflex/model_extensions_configuration.go +++ b/services/postgresflex/model_extensions_configuration.go @@ -10,8 +10,143 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the ExtensionsConfiguration type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExtensionsConfiguration{} + // ExtensionsConfiguration struct for ExtensionsConfiguration type ExtensionsConfiguration struct { Name *string `json:"name,omitempty"` Setting *string `json:"setting,omitempty"` } + +// NewExtensionsConfiguration instantiates a new ExtensionsConfiguration 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 NewExtensionsConfiguration() *ExtensionsConfiguration { + this := ExtensionsConfiguration{} + return &this +} + +// NewExtensionsConfigurationWithDefaults instantiates a new ExtensionsConfiguration 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 NewExtensionsConfigurationWithDefaults() *ExtensionsConfiguration { + this := ExtensionsConfiguration{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ExtensionsConfiguration) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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 *ExtensionsConfiguration) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ExtensionsConfiguration) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ExtensionsConfiguration) SetName(v *string) { + o.Name = v +} + +// GetSetting returns the Setting field value if set, zero value otherwise. +func (o *ExtensionsConfiguration) GetSetting() *string { + if o == nil || IsNil(o.Setting) { + var ret *string + return ret + } + return o.Setting +} + +// GetSettingOk returns a tuple with the Setting field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExtensionsConfiguration) GetSettingOk() (*string, bool) { + if o == nil || IsNil(o.Setting) { + return nil, false + } + return o.Setting, true +} + +// HasSetting returns a boolean if a field has been set. +func (o *ExtensionsConfiguration) HasSetting() bool { + if o != nil && !IsNil(o.Setting) { + return true + } + + return false +} + +// SetSetting gets a reference to the given string and assigns it to the Setting field. +func (o *ExtensionsConfiguration) SetSetting(v *string) { + o.Setting = v +} + +func (o ExtensionsConfiguration) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Setting) { + toSerialize["setting"] = o.Setting + } + return toSerialize, nil +} + +type NullableExtensionsConfiguration struct { + value *ExtensionsConfiguration + isSet bool +} + +func (v NullableExtensionsConfiguration) Get() *ExtensionsConfiguration { + return v.value +} + +func (v *NullableExtensionsConfiguration) Set(val *ExtensionsConfiguration) { + v.value = val + v.isSet = true +} + +func (v NullableExtensionsConfiguration) IsSet() bool { + return v.isSet +} + +func (v *NullableExtensionsConfiguration) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExtensionsConfiguration(val *ExtensionsConfiguration) *NullableExtensionsConfiguration { + return &NullableExtensionsConfiguration{value: val, isSet: true} +} + +func (v NullableExtensionsConfiguration) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExtensionsConfiguration) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_extensions_extension_list_response.go b/services/postgresflex/model_extensions_extension_list_response.go index 3f761ee00..b5a5a992b 100644 --- a/services/postgresflex/model_extensions_extension_list_response.go +++ b/services/postgresflex/model_extensions_extension_list_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the ExtensionsExtensionListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExtensionsExtensionListResponse{} + // ExtensionsExtensionListResponse struct for ExtensionsExtensionListResponse type ExtensionsExtensionListResponse struct { List *[]ApiExtensionList `json:"list,omitempty"` } + +// NewExtensionsExtensionListResponse instantiates a new ExtensionsExtensionListResponse 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 NewExtensionsExtensionListResponse() *ExtensionsExtensionListResponse { + this := ExtensionsExtensionListResponse{} + return &this +} + +// NewExtensionsExtensionListResponseWithDefaults instantiates a new ExtensionsExtensionListResponse 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 NewExtensionsExtensionListResponseWithDefaults() *ExtensionsExtensionListResponse { + this := ExtensionsExtensionListResponse{} + return &this +} + +// GetList returns the List field value if set, zero value otherwise. +func (o *ExtensionsExtensionListResponse) GetList() *[]ApiExtensionList { + if o == nil || IsNil(o.List) { + var ret *[]ApiExtensionList + return ret + } + return o.List +} + +// GetListOk returns a tuple with the List field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExtensionsExtensionListResponse) GetListOk() (*[]ApiExtensionList, bool) { + if o == nil || IsNil(o.List) { + return nil, false + } + return o.List, true +} + +// HasList returns a boolean if a field has been set. +func (o *ExtensionsExtensionListResponse) HasList() bool { + if o != nil && !IsNil(o.List) { + return true + } + + return false +} + +// SetList gets a reference to the given []ApiExtensionList and assigns it to the List field. +func (o *ExtensionsExtensionListResponse) SetList(v *[]ApiExtensionList) { + o.List = v +} + +func (o ExtensionsExtensionListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.List) { + toSerialize["list"] = o.List + } + return toSerialize, nil +} + +type NullableExtensionsExtensionListResponse struct { + value *ExtensionsExtensionListResponse + isSet bool +} + +func (v NullableExtensionsExtensionListResponse) Get() *ExtensionsExtensionListResponse { + return v.value +} + +func (v *NullableExtensionsExtensionListResponse) Set(val *ExtensionsExtensionListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableExtensionsExtensionListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableExtensionsExtensionListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExtensionsExtensionListResponse(val *ExtensionsExtensionListResponse) *NullableExtensionsExtensionListResponse { + return &NullableExtensionsExtensionListResponse{value: val, isSet: true} +} + +func (v NullableExtensionsExtensionListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExtensionsExtensionListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_extensions_new_config.go b/services/postgresflex/model_extensions_new_config.go index 1cdd5fd1a..8b1ecd290 100644 --- a/services/postgresflex/model_extensions_new_config.go +++ b/services/postgresflex/model_extensions_new_config.go @@ -10,7 +10,107 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the ExtensionsNewConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExtensionsNewConfig{} + // ExtensionsNewConfig struct for ExtensionsNewConfig type ExtensionsNewConfig struct { Configuration *[]ExtensionsConfiguration `json:"configuration,omitempty"` } + +// NewExtensionsNewConfig instantiates a new ExtensionsNewConfig 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 NewExtensionsNewConfig() *ExtensionsNewConfig { + this := ExtensionsNewConfig{} + return &this +} + +// NewExtensionsNewConfigWithDefaults instantiates a new ExtensionsNewConfig 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 NewExtensionsNewConfigWithDefaults() *ExtensionsNewConfig { + this := ExtensionsNewConfig{} + return &this +} + +// GetConfiguration returns the Configuration field value if set, zero value otherwise. +func (o *ExtensionsNewConfig) GetConfiguration() *[]ExtensionsConfiguration { + if o == nil || IsNil(o.Configuration) { + var ret *[]ExtensionsConfiguration + return ret + } + return o.Configuration +} + +// GetConfigurationOk returns a tuple with the Configuration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExtensionsNewConfig) GetConfigurationOk() (*[]ExtensionsConfiguration, bool) { + if o == nil || IsNil(o.Configuration) { + return nil, false + } + return o.Configuration, true +} + +// HasConfiguration returns a boolean if a field has been set. +func (o *ExtensionsNewConfig) HasConfiguration() bool { + if o != nil && !IsNil(o.Configuration) { + return true + } + + return false +} + +// SetConfiguration gets a reference to the given []ExtensionsConfiguration and assigns it to the Configuration field. +func (o *ExtensionsNewConfig) SetConfiguration(v *[]ExtensionsConfiguration) { + o.Configuration = v +} + +func (o ExtensionsNewConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Configuration) { + toSerialize["configuration"] = o.Configuration + } + return toSerialize, nil +} + +type NullableExtensionsNewConfig struct { + value *ExtensionsNewConfig + isSet bool +} + +func (v NullableExtensionsNewConfig) Get() *ExtensionsNewConfig { + return v.value +} + +func (v *NullableExtensionsNewConfig) Set(val *ExtensionsNewConfig) { + v.value = val + v.isSet = true +} + +func (v NullableExtensionsNewConfig) IsSet() bool { + return v.isSet +} + +func (v *NullableExtensionsNewConfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExtensionsNewConfig(val *ExtensionsNewConfig) *NullableExtensionsNewConfig { + return &NullableExtensionsNewConfig{value: val, isSet: true} +} + +func (v NullableExtensionsNewConfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExtensionsNewConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_flavor.go b/services/postgresflex/model_flavor.go index 9ba482331..c6cb06f7c 100644 --- a/services/postgresflex/model_flavor.go +++ b/services/postgresflex/model_flavor.go @@ -10,6 +10,13 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the Flavor type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Flavor{} + // Flavor struct for Flavor type Flavor struct { Cpu *int64 `json:"cpu,omitempty"` @@ -17,3 +24,201 @@ type Flavor struct { Id *string `json:"id,omitempty"` Memory *int64 `json:"memory,omitempty"` } + +// NewFlavor instantiates a new Flavor 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 NewFlavor() *Flavor { + this := Flavor{} + return &this +} + +// NewFlavorWithDefaults instantiates a new Flavor 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 NewFlavorWithDefaults() *Flavor { + this := Flavor{} + return &this +} + +// GetCpu returns the Cpu field value if set, zero value otherwise. +func (o *Flavor) GetCpu() *int64 { + if o == nil || IsNil(o.Cpu) { + var ret *int64 + return ret + } + return o.Cpu +} + +// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Flavor) GetCpuOk() (*int64, bool) { + if o == nil || IsNil(o.Cpu) { + return nil, false + } + return o.Cpu, true +} + +// HasCpu returns a boolean if a field has been set. +func (o *Flavor) HasCpu() bool { + if o != nil && !IsNil(o.Cpu) { + return true + } + + return false +} + +// SetCpu gets a reference to the given int64 and assigns it to the Cpu field. +func (o *Flavor) SetCpu(v *int64) { + o.Cpu = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Flavor) GetDescription() *string { + if o == nil || IsNil(o.Description) { + var ret *string + return ret + } + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Flavor) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *Flavor) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *Flavor) SetDescription(v *string) { + o.Description = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Flavor) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + return ret + } + return o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Flavor) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Flavor) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Flavor) SetId(v *string) { + o.Id = v +} + +// GetMemory returns the Memory field value if set, zero value otherwise. +func (o *Flavor) GetMemory() *int64 { + if o == nil || IsNil(o.Memory) { + var ret *int64 + return ret + } + return o.Memory +} + +// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Flavor) GetMemoryOk() (*int64, bool) { + if o == nil || IsNil(o.Memory) { + return nil, false + } + return o.Memory, true +} + +// HasMemory returns a boolean if a field has been set. +func (o *Flavor) HasMemory() bool { + if o != nil && !IsNil(o.Memory) { + return true + } + + return false +} + +// SetMemory gets a reference to the given int64 and assigns it to the Memory field. +func (o *Flavor) SetMemory(v *int64) { + o.Memory = v +} + +func (o Flavor) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Cpu) { + toSerialize["cpu"] = o.Cpu + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Memory) { + toSerialize["memory"] = o.Memory + } + return toSerialize, nil +} + +type NullableFlavor struct { + value *Flavor + isSet bool +} + +func (v NullableFlavor) Get() *Flavor { + return v.value +} + +func (v *NullableFlavor) Set(val *Flavor) { + v.value = val + v.isSet = true +} + +func (v NullableFlavor) IsSet() bool { + return v.isSet +} + +func (v *NullableFlavor) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFlavor(val *Flavor) *NullableFlavor { + return &NullableFlavor{value: val, isSet: true} +} + +func (v NullableFlavor) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFlavor) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_get_backup_response.go b/services/postgresflex/model_get_backup_response.go index dec45e250..bb96bf4b5 100644 --- a/services/postgresflex/model_get_backup_response.go +++ b/services/postgresflex/model_get_backup_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the GetBackupResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetBackupResponse{} + // GetBackupResponse struct for GetBackupResponse type GetBackupResponse struct { Item *Backup `json:"item,omitempty"` } + +// NewGetBackupResponse instantiates a new GetBackupResponse 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 NewGetBackupResponse() *GetBackupResponse { + this := GetBackupResponse{} + return &this +} + +// NewGetBackupResponseWithDefaults instantiates a new GetBackupResponse 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 NewGetBackupResponseWithDefaults() *GetBackupResponse { + this := GetBackupResponse{} + return &this +} + +// GetItem returns the Item field value if set, zero value otherwise. +func (o *GetBackupResponse) GetItem() *Backup { + if o == nil || IsNil(o.Item) { + var ret *Backup + return ret + } + return o.Item +} + +// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetBackupResponse) GetItemOk() (*Backup, bool) { + if o == nil || IsNil(o.Item) { + return nil, false + } + return o.Item, true +} + +// HasItem returns a boolean if a field has been set. +func (o *GetBackupResponse) HasItem() bool { + if o != nil && !IsNil(o.Item) { + return true + } + + return false +} + +// SetItem gets a reference to the given Backup and assigns it to the Item field. +func (o *GetBackupResponse) SetItem(v *Backup) { + o.Item = v +} + +func (o GetBackupResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Item) { + toSerialize["item"] = o.Item + } + return toSerialize, nil +} + +type NullableGetBackupResponse struct { + value *GetBackupResponse + isSet bool +} + +func (v NullableGetBackupResponse) Get() *GetBackupResponse { + return v.value +} + +func (v *NullableGetBackupResponse) Set(val *GetBackupResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetBackupResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetBackupResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetBackupResponse(val *GetBackupResponse) *NullableGetBackupResponse { + return &NullableGetBackupResponse{value: val, isSet: true} +} + +func (v NullableGetBackupResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetBackupResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_get_user_response.go b/services/postgresflex/model_get_user_response.go index 2024efad2..f305470c8 100644 --- a/services/postgresflex/model_get_user_response.go +++ b/services/postgresflex/model_get_user_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the GetUserResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetUserResponse{} + // GetUserResponse struct for GetUserResponse type GetUserResponse struct { Item *UserResponse `json:"item,omitempty"` } + +// NewGetUserResponse instantiates a new GetUserResponse 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 NewGetUserResponse() *GetUserResponse { + this := GetUserResponse{} + return &this +} + +// NewGetUserResponseWithDefaults instantiates a new GetUserResponse 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 NewGetUserResponseWithDefaults() *GetUserResponse { + this := GetUserResponse{} + return &this +} + +// GetItem returns the Item field value if set, zero value otherwise. +func (o *GetUserResponse) GetItem() *UserResponse { + if o == nil || IsNil(o.Item) { + var ret *UserResponse + return ret + } + return o.Item +} + +// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetUserResponse) GetItemOk() (*UserResponse, bool) { + if o == nil || IsNil(o.Item) { + return nil, false + } + return o.Item, true +} + +// HasItem returns a boolean if a field has been set. +func (o *GetUserResponse) HasItem() bool { + if o != nil && !IsNil(o.Item) { + return true + } + + return false +} + +// SetItem gets a reference to the given UserResponse and assigns it to the Item field. +func (o *GetUserResponse) SetItem(v *UserResponse) { + o.Item = v +} + +func (o GetUserResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Item) { + toSerialize["item"] = o.Item + } + return toSerialize, nil +} + +type NullableGetUserResponse struct { + value *GetUserResponse + isSet bool +} + +func (v NullableGetUserResponse) Get() *GetUserResponse { + return v.value +} + +func (v *NullableGetUserResponse) Set(val *GetUserResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetUserResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetUserResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetUserResponse(val *GetUserResponse) *NullableGetUserResponse { + return &NullableGetUserResponse{value: val, isSet: true} +} + +func (v NullableGetUserResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetUserResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_instance.go b/services/postgresflex/model_instance.go index f6b1fb3e8..7bb58284b 100644 --- a/services/postgresflex/model_instance.go +++ b/services/postgresflex/model_instance.go @@ -10,6 +10,13 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the Instance type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Instance{} + // Instance struct for Instance type Instance struct { Acl *ACL `json:"acl,omitempty"` @@ -23,3 +30,411 @@ type Instance struct { Storage *Storage `json:"storage,omitempty"` Version *string `json:"version,omitempty"` } + +// NewInstance instantiates a new Instance 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 NewInstance() *Instance { + this := Instance{} + return &this +} + +// NewInstanceWithDefaults instantiates a new Instance 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 NewInstanceWithDefaults() *Instance { + this := Instance{} + return &this +} + +// GetAcl returns the Acl field value if set, zero value otherwise. +func (o *Instance) GetAcl() *ACL { + if o == nil || IsNil(o.Acl) { + var ret *ACL + return ret + } + return o.Acl +} + +// GetAclOk returns a tuple with the Acl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetAclOk() (*ACL, bool) { + if o == nil || IsNil(o.Acl) { + return nil, false + } + return o.Acl, true +} + +// HasAcl returns a boolean if a field has been set. +func (o *Instance) HasAcl() bool { + if o != nil && !IsNil(o.Acl) { + return true + } + + return false +} + +// SetAcl gets a reference to the given ACL and assigns it to the Acl field. +func (o *Instance) SetAcl(v *ACL) { + o.Acl = v +} + +// GetBackupSchedule returns the BackupSchedule field value if set, zero value otherwise. +func (o *Instance) GetBackupSchedule() *string { + if o == nil || IsNil(o.BackupSchedule) { + var ret *string + return ret + } + return o.BackupSchedule +} + +// GetBackupScheduleOk returns a tuple with the BackupSchedule field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetBackupScheduleOk() (*string, bool) { + if o == nil || IsNil(o.BackupSchedule) { + return nil, false + } + return o.BackupSchedule, true +} + +// HasBackupSchedule returns a boolean if a field has been set. +func (o *Instance) HasBackupSchedule() bool { + if o != nil && !IsNil(o.BackupSchedule) { + return true + } + + return false +} + +// SetBackupSchedule gets a reference to the given string and assigns it to the BackupSchedule field. +func (o *Instance) SetBackupSchedule(v *string) { + o.BackupSchedule = v +} + +// GetFlavor returns the Flavor field value if set, zero value otherwise. +func (o *Instance) GetFlavor() *Flavor { + if o == nil || IsNil(o.Flavor) { + var ret *Flavor + return ret + } + return o.Flavor +} + +// GetFlavorOk returns a tuple with the Flavor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetFlavorOk() (*Flavor, bool) { + if o == nil || IsNil(o.Flavor) { + return nil, false + } + return o.Flavor, true +} + +// HasFlavor returns a boolean if a field has been set. +func (o *Instance) HasFlavor() bool { + if o != nil && !IsNil(o.Flavor) { + return true + } + + return false +} + +// SetFlavor gets a reference to the given Flavor and assigns it to the Flavor field. +func (o *Instance) SetFlavor(v *Flavor) { + o.Flavor = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Instance) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + return ret + } + return o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Instance) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Instance) SetId(v *string) { + o.Id = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Instance) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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 *Instance) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Instance) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Instance) SetName(v *string) { + o.Name = v +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *Instance) GetOptions() *map[string]string { + if o == nil || IsNil(o.Options) { + var ret *map[string]string + return ret + } + return o.Options +} + +// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetOptionsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Options) { + return nil, false + } + return o.Options, true +} + +// HasOptions returns a boolean if a field has been set. +func (o *Instance) HasOptions() bool { + if o != nil && !IsNil(o.Options) { + return true + } + + return false +} + +// SetOptions gets a reference to the given map[string]string and assigns it to the Options field. +func (o *Instance) SetOptions(v *map[string]string) { + o.Options = v +} + +// GetReplicas returns the Replicas field value if set, zero value otherwise. +func (o *Instance) GetReplicas() *int64 { + if o == nil || IsNil(o.Replicas) { + var ret *int64 + return ret + } + return o.Replicas +} + +// GetReplicasOk returns a tuple with the Replicas field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetReplicasOk() (*int64, bool) { + if o == nil || IsNil(o.Replicas) { + return nil, false + } + return o.Replicas, true +} + +// HasReplicas returns a boolean if a field has been set. +func (o *Instance) HasReplicas() bool { + if o != nil && !IsNil(o.Replicas) { + return true + } + + return false +} + +// SetReplicas gets a reference to the given int64 and assigns it to the Replicas field. +func (o *Instance) SetReplicas(v *int64) { + o.Replicas = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *Instance) GetStatus() *string { + if o == nil || IsNil(o.Status) { + var ret *string + return ret + } + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *Instance) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *Instance) SetStatus(v *string) { + o.Status = v +} + +// GetStorage returns the Storage field value if set, zero value otherwise. +func (o *Instance) GetStorage() *Storage { + if o == nil || IsNil(o.Storage) { + var ret *Storage + return ret + } + return o.Storage +} + +// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetStorageOk() (*Storage, bool) { + if o == nil || IsNil(o.Storage) { + return nil, false + } + return o.Storage, true +} + +// HasStorage returns a boolean if a field has been set. +func (o *Instance) HasStorage() bool { + if o != nil && !IsNil(o.Storage) { + return true + } + + return false +} + +// SetStorage gets a reference to the given Storage and assigns it to the Storage field. +func (o *Instance) SetStorage(v *Storage) { + o.Storage = v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *Instance) GetVersion() *string { + if o == nil || IsNil(o.Version) { + var ret *string + return ret + } + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *Instance) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *Instance) SetVersion(v *string) { + o.Version = v +} + +func (o Instance) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Acl) { + toSerialize["acl"] = o.Acl + } + if !IsNil(o.BackupSchedule) { + toSerialize["backupSchedule"] = o.BackupSchedule + } + if !IsNil(o.Flavor) { + toSerialize["flavor"] = o.Flavor + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Options) { + toSerialize["options"] = o.Options + } + if !IsNil(o.Replicas) { + toSerialize["replicas"] = o.Replicas + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Storage) { + toSerialize["storage"] = o.Storage + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullableInstance struct { + value *Instance + isSet bool +} + +func (v NullableInstance) Get() *Instance { + return v.value +} + +func (v *NullableInstance) Set(val *Instance) { + v.value = val + v.isSet = true +} + +func (v NullableInstance) IsSet() bool { + return v.isSet +} + +func (v *NullableInstance) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstance(val *Instance) *NullableInstance { + return &NullableInstance{value: val, isSet: true} +} + +func (v NullableInstance) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstance) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_instance_create_database_response.go b/services/postgresflex/model_instance_create_database_response.go index 0d25c5556..3b6ff9f73 100644 --- a/services/postgresflex/model_instance_create_database_response.go +++ b/services/postgresflex/model_instance_create_database_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the InstanceCreateDatabaseResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceCreateDatabaseResponse{} + // InstanceCreateDatabaseResponse struct for InstanceCreateDatabaseResponse type InstanceCreateDatabaseResponse struct { Id *string `json:"id,omitempty"` } + +// NewInstanceCreateDatabaseResponse instantiates a new InstanceCreateDatabaseResponse 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 NewInstanceCreateDatabaseResponse() *InstanceCreateDatabaseResponse { + this := InstanceCreateDatabaseResponse{} + return &this +} + +// NewInstanceCreateDatabaseResponseWithDefaults instantiates a new InstanceCreateDatabaseResponse 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 NewInstanceCreateDatabaseResponseWithDefaults() *InstanceCreateDatabaseResponse { + this := InstanceCreateDatabaseResponse{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *InstanceCreateDatabaseResponse) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + return ret + } + return o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceCreateDatabaseResponse) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *InstanceCreateDatabaseResponse) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *InstanceCreateDatabaseResponse) SetId(v *string) { + o.Id = v +} + +func (o InstanceCreateDatabaseResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + return toSerialize, nil +} + +type NullableInstanceCreateDatabaseResponse struct { + value *InstanceCreateDatabaseResponse + isSet bool +} + +func (v NullableInstanceCreateDatabaseResponse) Get() *InstanceCreateDatabaseResponse { + return v.value +} + +func (v *NullableInstanceCreateDatabaseResponse) Set(val *InstanceCreateDatabaseResponse) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceCreateDatabaseResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceCreateDatabaseResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceCreateDatabaseResponse(val *InstanceCreateDatabaseResponse) *NullableInstanceCreateDatabaseResponse { + return &NullableInstanceCreateDatabaseResponse{value: val, isSet: true} +} + +func (v NullableInstanceCreateDatabaseResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceCreateDatabaseResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_instance_data_point.go b/services/postgresflex/model_instance_data_point.go index 2442da8c1..39cc312d7 100644 --- a/services/postgresflex/model_instance_data_point.go +++ b/services/postgresflex/model_instance_data_point.go @@ -10,8 +10,143 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the InstanceDataPoint type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceDataPoint{} + // InstanceDataPoint struct for InstanceDataPoint type InstanceDataPoint struct { Timestamp *string `json:"timestamp,omitempty"` Value *float64 `json:"value,omitempty"` } + +// NewInstanceDataPoint instantiates a new InstanceDataPoint 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 NewInstanceDataPoint() *InstanceDataPoint { + this := InstanceDataPoint{} + return &this +} + +// NewInstanceDataPointWithDefaults instantiates a new InstanceDataPoint 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 NewInstanceDataPointWithDefaults() *InstanceDataPoint { + this := InstanceDataPoint{} + return &this +} + +// GetTimestamp returns the Timestamp field value if set, zero value otherwise. +func (o *InstanceDataPoint) GetTimestamp() *string { + if o == nil || IsNil(o.Timestamp) { + var ret *string + return ret + } + return o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceDataPoint) GetTimestampOk() (*string, bool) { + if o == nil || IsNil(o.Timestamp) { + return nil, false + } + return o.Timestamp, true +} + +// HasTimestamp returns a boolean if a field has been set. +func (o *InstanceDataPoint) HasTimestamp() bool { + if o != nil && !IsNil(o.Timestamp) { + return true + } + + return false +} + +// SetTimestamp gets a reference to the given string and assigns it to the Timestamp field. +func (o *InstanceDataPoint) SetTimestamp(v *string) { + o.Timestamp = v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *InstanceDataPoint) GetValue() *float64 { + if o == nil || IsNil(o.Value) { + var ret *float64 + return ret + } + return o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceDataPoint) GetValueOk() (*float64, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *InstanceDataPoint) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given float64 and assigns it to the Value field. +func (o *InstanceDataPoint) SetValue(v *float64) { + o.Value = v +} + +func (o InstanceDataPoint) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Timestamp) { + toSerialize["timestamp"] = o.Timestamp + } + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +type NullableInstanceDataPoint struct { + value *InstanceDataPoint + isSet bool +} + +func (v NullableInstanceDataPoint) Get() *InstanceDataPoint { + return v.value +} + +func (v *NullableInstanceDataPoint) Set(val *InstanceDataPoint) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceDataPoint) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceDataPoint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceDataPoint(val *InstanceDataPoint) *NullableInstanceDataPoint { + return &NullableInstanceDataPoint{value: val, isSet: true} +} + +func (v NullableInstanceDataPoint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceDataPoint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_instance_database.go b/services/postgresflex/model_instance_database.go index 26e0aa97a..cca33c0f2 100644 --- a/services/postgresflex/model_instance_database.go +++ b/services/postgresflex/model_instance_database.go @@ -10,6 +10,13 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the InstanceDatabase type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceDatabase{} + // InstanceDatabase struct for InstanceDatabase type InstanceDatabase struct { Id *string `json:"id,omitempty"` @@ -17,3 +24,166 @@ type InstanceDatabase struct { // Database specific options Options *map[string]interface{} `json:"options,omitempty"` } + +// NewInstanceDatabase instantiates a new InstanceDatabase 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 NewInstanceDatabase() *InstanceDatabase { + this := InstanceDatabase{} + return &this +} + +// NewInstanceDatabaseWithDefaults instantiates a new InstanceDatabase 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 NewInstanceDatabaseWithDefaults() *InstanceDatabase { + this := InstanceDatabase{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *InstanceDatabase) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + return ret + } + return o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceDatabase) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *InstanceDatabase) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *InstanceDatabase) SetId(v *string) { + o.Id = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *InstanceDatabase) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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 *InstanceDatabase) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *InstanceDatabase) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *InstanceDatabase) SetName(v *string) { + o.Name = v +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *InstanceDatabase) GetOptions() *map[string]interface{} { + if o == nil || IsNil(o.Options) { + var ret *map[string]interface{} + return ret + } + return o.Options +} + +// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceDatabase) GetOptionsOk() (*map[string]interface{}, bool) { + if o == nil || IsNil(o.Options) { + return &map[string]interface{}{}, false + } + return o.Options, true +} + +// HasOptions returns a boolean if a field has been set. +func (o *InstanceDatabase) HasOptions() bool { + if o != nil && !IsNil(o.Options) { + return true + } + + return false +} + +// SetOptions gets a reference to the given map[string]interface{} and assigns it to the Options field. +func (o *InstanceDatabase) SetOptions(v *map[string]interface{}) { + o.Options = v +} + +func (o InstanceDatabase) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Options) { + toSerialize["options"] = o.Options + } + return toSerialize, nil +} + +type NullableInstanceDatabase struct { + value *InstanceDatabase + isSet bool +} + +func (v NullableInstanceDatabase) Get() *InstanceDatabase { + return v.value +} + +func (v *NullableInstanceDatabase) Set(val *InstanceDatabase) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceDatabase) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceDatabase) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceDatabase(val *InstanceDatabase) *NullableInstanceDatabase { + return &NullableInstanceDatabase{value: val, isSet: true} +} + +func (v NullableInstanceDatabase) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceDatabase) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_instance_host.go b/services/postgresflex/model_instance_host.go index 7ff33fd41..744e354c4 100644 --- a/services/postgresflex/model_instance_host.go +++ b/services/postgresflex/model_instance_host.go @@ -10,8 +10,143 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the InstanceHost type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceHost{} + // InstanceHost struct for InstanceHost type InstanceHost struct { HostMetrics *[]InstanceHostMetric `json:"hostMetrics,omitempty"` Id *string `json:"id,omitempty"` } + +// NewInstanceHost instantiates a new InstanceHost 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 NewInstanceHost() *InstanceHost { + this := InstanceHost{} + return &this +} + +// NewInstanceHostWithDefaults instantiates a new InstanceHost 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 NewInstanceHostWithDefaults() *InstanceHost { + this := InstanceHost{} + return &this +} + +// GetHostMetrics returns the HostMetrics field value if set, zero value otherwise. +func (o *InstanceHost) GetHostMetrics() *[]InstanceHostMetric { + if o == nil || IsNil(o.HostMetrics) { + var ret *[]InstanceHostMetric + return ret + } + return o.HostMetrics +} + +// GetHostMetricsOk returns a tuple with the HostMetrics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceHost) GetHostMetricsOk() (*[]InstanceHostMetric, bool) { + if o == nil || IsNil(o.HostMetrics) { + return nil, false + } + return o.HostMetrics, true +} + +// HasHostMetrics returns a boolean if a field has been set. +func (o *InstanceHost) HasHostMetrics() bool { + if o != nil && !IsNil(o.HostMetrics) { + return true + } + + return false +} + +// SetHostMetrics gets a reference to the given []InstanceHostMetric and assigns it to the HostMetrics field. +func (o *InstanceHost) SetHostMetrics(v *[]InstanceHostMetric) { + o.HostMetrics = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *InstanceHost) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + return ret + } + return o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceHost) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *InstanceHost) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *InstanceHost) SetId(v *string) { + o.Id = v +} + +func (o InstanceHost) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.HostMetrics) { + toSerialize["hostMetrics"] = o.HostMetrics + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + return toSerialize, nil +} + +type NullableInstanceHost struct { + value *InstanceHost + isSet bool +} + +func (v NullableInstanceHost) Get() *InstanceHost { + return v.value +} + +func (v *NullableInstanceHost) Set(val *InstanceHost) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceHost) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceHost) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceHost(val *InstanceHost) *NullableInstanceHost { + return &NullableInstanceHost{value: val, isSet: true} +} + +func (v NullableInstanceHost) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceHost) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_instance_host_metric.go b/services/postgresflex/model_instance_host_metric.go index eb10de11a..745f7da92 100644 --- a/services/postgresflex/model_instance_host_metric.go +++ b/services/postgresflex/model_instance_host_metric.go @@ -10,9 +10,179 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the InstanceHostMetric type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceHostMetric{} + // InstanceHostMetric struct for InstanceHostMetric type InstanceHostMetric struct { Datapoints *[]InstanceDataPoint `json:"datapoints,omitempty"` Name *string `json:"name,omitempty"` Units *string `json:"units,omitempty"` } + +// NewInstanceHostMetric instantiates a new InstanceHostMetric 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 NewInstanceHostMetric() *InstanceHostMetric { + this := InstanceHostMetric{} + return &this +} + +// NewInstanceHostMetricWithDefaults instantiates a new InstanceHostMetric 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 NewInstanceHostMetricWithDefaults() *InstanceHostMetric { + this := InstanceHostMetric{} + return &this +} + +// GetDatapoints returns the Datapoints field value if set, zero value otherwise. +func (o *InstanceHostMetric) GetDatapoints() *[]InstanceDataPoint { + if o == nil || IsNil(o.Datapoints) { + var ret *[]InstanceDataPoint + return ret + } + return o.Datapoints +} + +// GetDatapointsOk returns a tuple with the Datapoints field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceHostMetric) GetDatapointsOk() (*[]InstanceDataPoint, bool) { + if o == nil || IsNil(o.Datapoints) { + return nil, false + } + return o.Datapoints, true +} + +// HasDatapoints returns a boolean if a field has been set. +func (o *InstanceHostMetric) HasDatapoints() bool { + if o != nil && !IsNil(o.Datapoints) { + return true + } + + return false +} + +// SetDatapoints gets a reference to the given []InstanceDataPoint and assigns it to the Datapoints field. +func (o *InstanceHostMetric) SetDatapoints(v *[]InstanceDataPoint) { + o.Datapoints = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *InstanceHostMetric) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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 *InstanceHostMetric) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *InstanceHostMetric) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *InstanceHostMetric) SetName(v *string) { + o.Name = v +} + +// GetUnits returns the Units field value if set, zero value otherwise. +func (o *InstanceHostMetric) GetUnits() *string { + if o == nil || IsNil(o.Units) { + var ret *string + return ret + } + return o.Units +} + +// GetUnitsOk returns a tuple with the Units field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceHostMetric) GetUnitsOk() (*string, bool) { + if o == nil || IsNil(o.Units) { + return nil, false + } + return o.Units, true +} + +// HasUnits returns a boolean if a field has been set. +func (o *InstanceHostMetric) HasUnits() bool { + if o != nil && !IsNil(o.Units) { + return true + } + + return false +} + +// SetUnits gets a reference to the given string and assigns it to the Units field. +func (o *InstanceHostMetric) SetUnits(v *string) { + o.Units = v +} + +func (o InstanceHostMetric) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Datapoints) { + toSerialize["datapoints"] = o.Datapoints + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Units) { + toSerialize["units"] = o.Units + } + return toSerialize, nil +} + +type NullableInstanceHostMetric struct { + value *InstanceHostMetric + isSet bool +} + +func (v NullableInstanceHostMetric) Get() *InstanceHostMetric { + return v.value +} + +func (v *NullableInstanceHostMetric) Set(val *InstanceHostMetric) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceHostMetric) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceHostMetric) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceHostMetric(val *InstanceHostMetric) *NullableInstanceHostMetric { + return &NullableInstanceHostMetric{value: val, isSet: true} +} + +func (v NullableInstanceHostMetric) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceHostMetric) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_instance_list_databases_response.go b/services/postgresflex/model_instance_list_databases_response.go index bd9991059..3d1107b2b 100644 --- a/services/postgresflex/model_instance_list_databases_response.go +++ b/services/postgresflex/model_instance_list_databases_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the InstanceListDatabasesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceListDatabasesResponse{} + // InstanceListDatabasesResponse struct for InstanceListDatabasesResponse type InstanceListDatabasesResponse struct { Databases *[]InstanceDatabase `json:"databases,omitempty"` } + +// NewInstanceListDatabasesResponse instantiates a new InstanceListDatabasesResponse 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 NewInstanceListDatabasesResponse() *InstanceListDatabasesResponse { + this := InstanceListDatabasesResponse{} + return &this +} + +// NewInstanceListDatabasesResponseWithDefaults instantiates a new InstanceListDatabasesResponse 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 NewInstanceListDatabasesResponseWithDefaults() *InstanceListDatabasesResponse { + this := InstanceListDatabasesResponse{} + return &this +} + +// GetDatabases returns the Databases field value if set, zero value otherwise. +func (o *InstanceListDatabasesResponse) GetDatabases() *[]InstanceDatabase { + if o == nil || IsNil(o.Databases) { + var ret *[]InstanceDatabase + return ret + } + return o.Databases +} + +// GetDatabasesOk returns a tuple with the Databases field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceListDatabasesResponse) GetDatabasesOk() (*[]InstanceDatabase, bool) { + if o == nil || IsNil(o.Databases) { + return nil, false + } + return o.Databases, true +} + +// HasDatabases returns a boolean if a field has been set. +func (o *InstanceListDatabasesResponse) HasDatabases() bool { + if o != nil && !IsNil(o.Databases) { + return true + } + + return false +} + +// SetDatabases gets a reference to the given []InstanceDatabase and assigns it to the Databases field. +func (o *InstanceListDatabasesResponse) SetDatabases(v *[]InstanceDatabase) { + o.Databases = v +} + +func (o InstanceListDatabasesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Databases) { + toSerialize["databases"] = o.Databases + } + return toSerialize, nil +} + +type NullableInstanceListDatabasesResponse struct { + value *InstanceListDatabasesResponse + isSet bool +} + +func (v NullableInstanceListDatabasesResponse) Get() *InstanceListDatabasesResponse { + return v.value +} + +func (v *NullableInstanceListDatabasesResponse) Set(val *InstanceListDatabasesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceListDatabasesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceListDatabasesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceListDatabasesResponse(val *InstanceListDatabasesResponse) *NullableInstanceListDatabasesResponse { + return &NullableInstanceListDatabasesResponse{value: val, isSet: true} +} + +func (v NullableInstanceListDatabasesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceListDatabasesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_instance_list_instance.go b/services/postgresflex/model_instance_list_instance.go index 2e49dcb77..8a8fa2779 100644 --- a/services/postgresflex/model_instance_list_instance.go +++ b/services/postgresflex/model_instance_list_instance.go @@ -10,9 +10,179 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the InstanceListInstance type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceListInstance{} + // InstanceListInstance struct for InstanceListInstance type InstanceListInstance struct { Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Status *string `json:"status,omitempty"` } + +// NewInstanceListInstance instantiates a new InstanceListInstance 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 NewInstanceListInstance() *InstanceListInstance { + this := InstanceListInstance{} + return &this +} + +// NewInstanceListInstanceWithDefaults instantiates a new InstanceListInstance 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 NewInstanceListInstanceWithDefaults() *InstanceListInstance { + this := InstanceListInstance{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *InstanceListInstance) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + return ret + } + return o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceListInstance) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *InstanceListInstance) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *InstanceListInstance) SetId(v *string) { + o.Id = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *InstanceListInstance) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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 *InstanceListInstance) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *InstanceListInstance) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *InstanceListInstance) SetName(v *string) { + o.Name = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *InstanceListInstance) GetStatus() *string { + if o == nil || IsNil(o.Status) { + var ret *string + return ret + } + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceListInstance) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *InstanceListInstance) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *InstanceListInstance) SetStatus(v *string) { + o.Status = v +} + +func (o InstanceListInstance) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +type NullableInstanceListInstance struct { + value *InstanceListInstance + isSet bool +} + +func (v NullableInstanceListInstance) Get() *InstanceListInstance { + return v.value +} + +func (v *NullableInstanceListInstance) Set(val *InstanceListInstance) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceListInstance) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceListInstance) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceListInstance(val *InstanceListInstance) *NullableInstanceListInstance { + return &NullableInstanceListInstance{value: val, isSet: true} +} + +func (v NullableInstanceListInstance) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceListInstance) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_instance_metrics_response.go b/services/postgresflex/model_instance_metrics_response.go index bafd19164..06c3790f5 100644 --- a/services/postgresflex/model_instance_metrics_response.go +++ b/services/postgresflex/model_instance_metrics_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the InstanceMetricsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceMetricsResponse{} + // InstanceMetricsResponse struct for InstanceMetricsResponse type InstanceMetricsResponse struct { Hosts *[]InstanceHost `json:"hosts,omitempty"` } + +// NewInstanceMetricsResponse instantiates a new InstanceMetricsResponse 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 NewInstanceMetricsResponse() *InstanceMetricsResponse { + this := InstanceMetricsResponse{} + return &this +} + +// NewInstanceMetricsResponseWithDefaults instantiates a new InstanceMetricsResponse 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 NewInstanceMetricsResponseWithDefaults() *InstanceMetricsResponse { + this := InstanceMetricsResponse{} + return &this +} + +// GetHosts returns the Hosts field value if set, zero value otherwise. +func (o *InstanceMetricsResponse) GetHosts() *[]InstanceHost { + if o == nil || IsNil(o.Hosts) { + var ret *[]InstanceHost + return ret + } + return o.Hosts +} + +// GetHostsOk returns a tuple with the Hosts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceMetricsResponse) GetHostsOk() (*[]InstanceHost, bool) { + if o == nil || IsNil(o.Hosts) { + return nil, false + } + return o.Hosts, true +} + +// HasHosts returns a boolean if a field has been set. +func (o *InstanceMetricsResponse) HasHosts() bool { + if o != nil && !IsNil(o.Hosts) { + return true + } + + return false +} + +// SetHosts gets a reference to the given []InstanceHost and assigns it to the Hosts field. +func (o *InstanceMetricsResponse) SetHosts(v *[]InstanceHost) { + o.Hosts = v +} + +func (o InstanceMetricsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Hosts) { + toSerialize["hosts"] = o.Hosts + } + return toSerialize, nil +} + +type NullableInstanceMetricsResponse struct { + value *InstanceMetricsResponse + isSet bool +} + +func (v NullableInstanceMetricsResponse) Get() *InstanceMetricsResponse { + return v.value +} + +func (v *NullableInstanceMetricsResponse) Set(val *InstanceMetricsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceMetricsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceMetricsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceMetricsResponse(val *InstanceMetricsResponse) *NullableInstanceMetricsResponse { + return &NullableInstanceMetricsResponse{value: val, isSet: true} +} + +func (v NullableInstanceMetricsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceMetricsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_instance_response.go b/services/postgresflex/model_instance_response.go index 8a706421d..8f814ad26 100644 --- a/services/postgresflex/model_instance_response.go +++ b/services/postgresflex/model_instance_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the InstanceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceResponse{} + // InstanceResponse struct for InstanceResponse type InstanceResponse struct { Item *Instance `json:"item,omitempty"` } + +// NewInstanceResponse instantiates a new InstanceResponse 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 NewInstanceResponse() *InstanceResponse { + this := InstanceResponse{} + return &this +} + +// NewInstanceResponseWithDefaults instantiates a new InstanceResponse 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 NewInstanceResponseWithDefaults() *InstanceResponse { + this := InstanceResponse{} + return &this +} + +// GetItem returns the Item field value if set, zero value otherwise. +func (o *InstanceResponse) GetItem() *Instance { + if o == nil || IsNil(o.Item) { + var ret *Instance + return ret + } + return o.Item +} + +// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceResponse) GetItemOk() (*Instance, bool) { + if o == nil || IsNil(o.Item) { + return nil, false + } + return o.Item, true +} + +// HasItem returns a boolean if a field has been set. +func (o *InstanceResponse) HasItem() bool { + if o != nil && !IsNil(o.Item) { + return true + } + + return false +} + +// SetItem gets a reference to the given Instance and assigns it to the Item field. +func (o *InstanceResponse) SetItem(v *Instance) { + o.Item = v +} + +func (o InstanceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Item) { + toSerialize["item"] = o.Item + } + return toSerialize, nil +} + +type NullableInstanceResponse struct { + value *InstanceResponse + isSet bool +} + +func (v NullableInstanceResponse) Get() *InstanceResponse { + return v.value +} + +func (v *NullableInstanceResponse) Set(val *InstanceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceResponse(val *InstanceResponse) *NullableInstanceResponse { + return &NullableInstanceResponse{value: val, isSet: true} +} + +func (v NullableInstanceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_list_backups_response.go b/services/postgresflex/model_list_backups_response.go index f11280e94..ab789cc72 100644 --- a/services/postgresflex/model_list_backups_response.go +++ b/services/postgresflex/model_list_backups_response.go @@ -10,8 +10,143 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the ListBackupsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListBackupsResponse{} + // ListBackupsResponse struct for ListBackupsResponse type ListBackupsResponse struct { Count *int64 `json:"count,omitempty"` Items *[]Backup `json:"items,omitempty"` } + +// NewListBackupsResponse instantiates a new ListBackupsResponse 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 NewListBackupsResponse() *ListBackupsResponse { + this := ListBackupsResponse{} + return &this +} + +// NewListBackupsResponseWithDefaults instantiates a new ListBackupsResponse 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 NewListBackupsResponseWithDefaults() *ListBackupsResponse { + this := ListBackupsResponse{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *ListBackupsResponse) GetCount() *int64 { + if o == nil || IsNil(o.Count) { + var ret *int64 + return ret + } + return o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListBackupsResponse) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *ListBackupsResponse) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *ListBackupsResponse) SetCount(v *int64) { + o.Count = v +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ListBackupsResponse) GetItems() *[]Backup { + if o == nil || IsNil(o.Items) { + var ret *[]Backup + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListBackupsResponse) GetItemsOk() (*[]Backup, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *ListBackupsResponse) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []Backup and assigns it to the Items field. +func (o *ListBackupsResponse) SetItems(v *[]Backup) { + o.Items = v +} + +func (o ListBackupsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + return toSerialize, nil +} + +type NullableListBackupsResponse struct { + value *ListBackupsResponse + isSet bool +} + +func (v NullableListBackupsResponse) Get() *ListBackupsResponse { + return v.value +} + +func (v *NullableListBackupsResponse) Set(val *ListBackupsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListBackupsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListBackupsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListBackupsResponse(val *ListBackupsResponse) *NullableListBackupsResponse { + return &NullableListBackupsResponse{value: val, isSet: true} +} + +func (v NullableListBackupsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListBackupsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_list_flavors_response.go b/services/postgresflex/model_list_flavors_response.go index 262689529..ba4da5871 100644 --- a/services/postgresflex/model_list_flavors_response.go +++ b/services/postgresflex/model_list_flavors_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the ListFlavorsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListFlavorsResponse{} + // ListFlavorsResponse struct for ListFlavorsResponse type ListFlavorsResponse struct { Flavors *[]Flavor `json:"flavors,omitempty"` } + +// NewListFlavorsResponse instantiates a new ListFlavorsResponse 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 NewListFlavorsResponse() *ListFlavorsResponse { + this := ListFlavorsResponse{} + return &this +} + +// NewListFlavorsResponseWithDefaults instantiates a new ListFlavorsResponse 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 NewListFlavorsResponseWithDefaults() *ListFlavorsResponse { + this := ListFlavorsResponse{} + return &this +} + +// GetFlavors returns the Flavors field value if set, zero value otherwise. +func (o *ListFlavorsResponse) GetFlavors() *[]Flavor { + if o == nil || IsNil(o.Flavors) { + var ret *[]Flavor + return ret + } + return o.Flavors +} + +// GetFlavorsOk returns a tuple with the Flavors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListFlavorsResponse) GetFlavorsOk() (*[]Flavor, bool) { + if o == nil || IsNil(o.Flavors) { + return nil, false + } + return o.Flavors, true +} + +// HasFlavors returns a boolean if a field has been set. +func (o *ListFlavorsResponse) HasFlavors() bool { + if o != nil && !IsNil(o.Flavors) { + return true + } + + return false +} + +// SetFlavors gets a reference to the given []Flavor and assigns it to the Flavors field. +func (o *ListFlavorsResponse) SetFlavors(v *[]Flavor) { + o.Flavors = v +} + +func (o ListFlavorsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Flavors) { + toSerialize["flavors"] = o.Flavors + } + return toSerialize, nil +} + +type NullableListFlavorsResponse struct { + value *ListFlavorsResponse + isSet bool +} + +func (v NullableListFlavorsResponse) Get() *ListFlavorsResponse { + return v.value +} + +func (v *NullableListFlavorsResponse) Set(val *ListFlavorsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListFlavorsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListFlavorsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListFlavorsResponse(val *ListFlavorsResponse) *NullableListFlavorsResponse { + return &NullableListFlavorsResponse{value: val, isSet: true} +} + +func (v NullableListFlavorsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListFlavorsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_list_instances_response.go b/services/postgresflex/model_list_instances_response.go index 07afe45c4..bcf116f4b 100644 --- a/services/postgresflex/model_list_instances_response.go +++ b/services/postgresflex/model_list_instances_response.go @@ -10,8 +10,143 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the ListInstancesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListInstancesResponse{} + // ListInstancesResponse struct for ListInstancesResponse type ListInstancesResponse struct { Count *int64 `json:"count,omitempty"` Items *[]InstanceListInstance `json:"items,omitempty"` } + +// NewListInstancesResponse instantiates a new ListInstancesResponse 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 NewListInstancesResponse() *ListInstancesResponse { + this := ListInstancesResponse{} + return &this +} + +// NewListInstancesResponseWithDefaults instantiates a new ListInstancesResponse 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 NewListInstancesResponseWithDefaults() *ListInstancesResponse { + this := ListInstancesResponse{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *ListInstancesResponse) GetCount() *int64 { + if o == nil || IsNil(o.Count) { + var ret *int64 + return ret + } + return o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListInstancesResponse) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *ListInstancesResponse) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *ListInstancesResponse) SetCount(v *int64) { + o.Count = v +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ListInstancesResponse) GetItems() *[]InstanceListInstance { + if o == nil || IsNil(o.Items) { + var ret *[]InstanceListInstance + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListInstancesResponse) GetItemsOk() (*[]InstanceListInstance, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *ListInstancesResponse) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []InstanceListInstance and assigns it to the Items field. +func (o *ListInstancesResponse) SetItems(v *[]InstanceListInstance) { + o.Items = v +} + +func (o ListInstancesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + return toSerialize, nil +} + +type NullableListInstancesResponse struct { + value *ListInstancesResponse + isSet bool +} + +func (v NullableListInstancesResponse) Get() *ListInstancesResponse { + return v.value +} + +func (v *NullableListInstancesResponse) Set(val *ListInstancesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListInstancesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListInstancesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListInstancesResponse(val *ListInstancesResponse) *NullableListInstancesResponse { + return &NullableListInstancesResponse{value: val, isSet: true} +} + +func (v NullableListInstancesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListInstancesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_list_storages_response.go b/services/postgresflex/model_list_storages_response.go index ef9842256..06a8a5a9e 100644 --- a/services/postgresflex/model_list_storages_response.go +++ b/services/postgresflex/model_list_storages_response.go @@ -10,8 +10,143 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the ListStoragesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListStoragesResponse{} + // ListStoragesResponse struct for ListStoragesResponse type ListStoragesResponse struct { StorageClasses *[]string `json:"storageClasses,omitempty"` StorageRange *StorageRange `json:"storageRange,omitempty"` } + +// NewListStoragesResponse instantiates a new ListStoragesResponse 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 NewListStoragesResponse() *ListStoragesResponse { + this := ListStoragesResponse{} + return &this +} + +// NewListStoragesResponseWithDefaults instantiates a new ListStoragesResponse 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 NewListStoragesResponseWithDefaults() *ListStoragesResponse { + this := ListStoragesResponse{} + return &this +} + +// GetStorageClasses returns the StorageClasses field value if set, zero value otherwise. +func (o *ListStoragesResponse) GetStorageClasses() *[]string { + if o == nil || IsNil(o.StorageClasses) { + var ret *[]string + return ret + } + return o.StorageClasses +} + +// GetStorageClassesOk returns a tuple with the StorageClasses field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListStoragesResponse) GetStorageClassesOk() (*[]string, bool) { + if o == nil || IsNil(o.StorageClasses) { + return nil, false + } + return o.StorageClasses, true +} + +// HasStorageClasses returns a boolean if a field has been set. +func (o *ListStoragesResponse) HasStorageClasses() bool { + if o != nil && !IsNil(o.StorageClasses) { + return true + } + + return false +} + +// SetStorageClasses gets a reference to the given []string and assigns it to the StorageClasses field. +func (o *ListStoragesResponse) SetStorageClasses(v *[]string) { + o.StorageClasses = v +} + +// GetStorageRange returns the StorageRange field value if set, zero value otherwise. +func (o *ListStoragesResponse) GetStorageRange() *StorageRange { + if o == nil || IsNil(o.StorageRange) { + var ret *StorageRange + return ret + } + return o.StorageRange +} + +// GetStorageRangeOk returns a tuple with the StorageRange field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListStoragesResponse) GetStorageRangeOk() (*StorageRange, bool) { + if o == nil || IsNil(o.StorageRange) { + return nil, false + } + return o.StorageRange, true +} + +// HasStorageRange returns a boolean if a field has been set. +func (o *ListStoragesResponse) HasStorageRange() bool { + if o != nil && !IsNil(o.StorageRange) { + return true + } + + return false +} + +// SetStorageRange gets a reference to the given StorageRange and assigns it to the StorageRange field. +func (o *ListStoragesResponse) SetStorageRange(v *StorageRange) { + o.StorageRange = v +} + +func (o ListStoragesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.StorageClasses) { + toSerialize["storageClasses"] = o.StorageClasses + } + if !IsNil(o.StorageRange) { + toSerialize["storageRange"] = o.StorageRange + } + return toSerialize, nil +} + +type NullableListStoragesResponse struct { + value *ListStoragesResponse + isSet bool +} + +func (v NullableListStoragesResponse) Get() *ListStoragesResponse { + return v.value +} + +func (v *NullableListStoragesResponse) Set(val *ListStoragesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListStoragesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListStoragesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListStoragesResponse(val *ListStoragesResponse) *NullableListStoragesResponse { + return &NullableListStoragesResponse{value: val, isSet: true} +} + +func (v NullableListStoragesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListStoragesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_list_users_response.go b/services/postgresflex/model_list_users_response.go index 2eb2a240f..a8cc5dc80 100644 --- a/services/postgresflex/model_list_users_response.go +++ b/services/postgresflex/model_list_users_response.go @@ -10,8 +10,143 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the ListUsersResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListUsersResponse{} + // ListUsersResponse struct for ListUsersResponse type ListUsersResponse struct { Count *int64 `json:"count,omitempty"` Items *[]ListUsersResponseItem `json:"items,omitempty"` } + +// NewListUsersResponse instantiates a new ListUsersResponse 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 NewListUsersResponse() *ListUsersResponse { + this := ListUsersResponse{} + return &this +} + +// NewListUsersResponseWithDefaults instantiates a new ListUsersResponse 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 NewListUsersResponseWithDefaults() *ListUsersResponse { + this := ListUsersResponse{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *ListUsersResponse) GetCount() *int64 { + if o == nil || IsNil(o.Count) { + var ret *int64 + return ret + } + return o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListUsersResponse) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *ListUsersResponse) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *ListUsersResponse) SetCount(v *int64) { + o.Count = v +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ListUsersResponse) GetItems() *[]ListUsersResponseItem { + if o == nil || IsNil(o.Items) { + var ret *[]ListUsersResponseItem + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListUsersResponse) GetItemsOk() (*[]ListUsersResponseItem, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *ListUsersResponse) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []ListUsersResponseItem and assigns it to the Items field. +func (o *ListUsersResponse) SetItems(v *[]ListUsersResponseItem) { + o.Items = v +} + +func (o ListUsersResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + return toSerialize, nil +} + +type NullableListUsersResponse struct { + value *ListUsersResponse + isSet bool +} + +func (v NullableListUsersResponse) Get() *ListUsersResponse { + return v.value +} + +func (v *NullableListUsersResponse) Set(val *ListUsersResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListUsersResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListUsersResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListUsersResponse(val *ListUsersResponse) *NullableListUsersResponse { + return &NullableListUsersResponse{value: val, isSet: true} +} + +func (v NullableListUsersResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListUsersResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_list_users_response_item.go b/services/postgresflex/model_list_users_response_item.go index e06528129..05637b838 100644 --- a/services/postgresflex/model_list_users_response_item.go +++ b/services/postgresflex/model_list_users_response_item.go @@ -10,8 +10,143 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the ListUsersResponseItem type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListUsersResponseItem{} + // ListUsersResponseItem struct for ListUsersResponseItem type ListUsersResponseItem struct { Id *string `json:"id,omitempty"` Username *string `json:"username,omitempty"` } + +// NewListUsersResponseItem instantiates a new ListUsersResponseItem 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 NewListUsersResponseItem() *ListUsersResponseItem { + this := ListUsersResponseItem{} + return &this +} + +// NewListUsersResponseItemWithDefaults instantiates a new ListUsersResponseItem 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 NewListUsersResponseItemWithDefaults() *ListUsersResponseItem { + this := ListUsersResponseItem{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ListUsersResponseItem) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + return ret + } + return o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListUsersResponseItem) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ListUsersResponseItem) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *ListUsersResponseItem) SetId(v *string) { + o.Id = v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *ListUsersResponseItem) GetUsername() *string { + if o == nil || IsNil(o.Username) { + var ret *string + return ret + } + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListUsersResponseItem) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *ListUsersResponseItem) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *ListUsersResponseItem) SetUsername(v *string) { + o.Username = v +} + +func (o ListUsersResponseItem) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +type NullableListUsersResponseItem struct { + value *ListUsersResponseItem + isSet bool +} + +func (v NullableListUsersResponseItem) Get() *ListUsersResponseItem { + return v.value +} + +func (v *NullableListUsersResponseItem) Set(val *ListUsersResponseItem) { + v.value = val + v.isSet = true +} + +func (v NullableListUsersResponseItem) IsSet() bool { + return v.isSet +} + +func (v *NullableListUsersResponseItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListUsersResponseItem(val *ListUsersResponseItem) *NullableListUsersResponseItem { + return &NullableListUsersResponseItem{value: val, isSet: true} +} + +func (v NullableListUsersResponseItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListUsersResponseItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_list_versions_response.go b/services/postgresflex/model_list_versions_response.go index fa064b280..5ecfd84a2 100644 --- a/services/postgresflex/model_list_versions_response.go +++ b/services/postgresflex/model_list_versions_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the ListVersionsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListVersionsResponse{} + // ListVersionsResponse struct for ListVersionsResponse type ListVersionsResponse struct { Versions *[]string `json:"versions,omitempty"` } + +// NewListVersionsResponse instantiates a new ListVersionsResponse 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 NewListVersionsResponse() *ListVersionsResponse { + this := ListVersionsResponse{} + return &this +} + +// NewListVersionsResponseWithDefaults instantiates a new ListVersionsResponse 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 NewListVersionsResponseWithDefaults() *ListVersionsResponse { + this := ListVersionsResponse{} + return &this +} + +// GetVersions returns the Versions field value if set, zero value otherwise. +func (o *ListVersionsResponse) GetVersions() *[]string { + if o == nil || IsNil(o.Versions) { + var ret *[]string + return ret + } + return o.Versions +} + +// GetVersionsOk returns a tuple with the Versions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListVersionsResponse) GetVersionsOk() (*[]string, bool) { + if o == nil || IsNil(o.Versions) { + return nil, false + } + return o.Versions, true +} + +// HasVersions returns a boolean if a field has been set. +func (o *ListVersionsResponse) HasVersions() bool { + if o != nil && !IsNil(o.Versions) { + return true + } + + return false +} + +// SetVersions gets a reference to the given []string and assigns it to the Versions field. +func (o *ListVersionsResponse) SetVersions(v *[]string) { + o.Versions = v +} + +func (o ListVersionsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Versions) { + toSerialize["versions"] = o.Versions + } + return toSerialize, nil +} + +type NullableListVersionsResponse struct { + value *ListVersionsResponse + isSet bool +} + +func (v NullableListVersionsResponse) Get() *ListVersionsResponse { + return v.value +} + +func (v *NullableListVersionsResponse) Set(val *ListVersionsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListVersionsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListVersionsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListVersionsResponse(val *ListVersionsResponse) *NullableListVersionsResponse { + return &NullableListVersionsResponse{value: val, isSet: true} +} + +func (v NullableListVersionsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListVersionsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_partial_update_instance_payload.go b/services/postgresflex/model_partial_update_instance_payload.go index 8eb7a3c95..e5139826e 100644 --- a/services/postgresflex/model_partial_update_instance_payload.go +++ b/services/postgresflex/model_partial_update_instance_payload.go @@ -10,6 +10,13 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the PartialUpdateInstancePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PartialUpdateInstancePayload{} + // PartialUpdateInstancePayload struct for PartialUpdateInstancePayload type PartialUpdateInstancePayload struct { Acl *ACL `json:"acl,omitempty"` @@ -23,3 +30,376 @@ type PartialUpdateInstancePayload struct { Storage *Storage `json:"storage,omitempty"` Version *string `json:"version,omitempty"` } + +// NewPartialUpdateInstancePayload instantiates a new PartialUpdateInstancePayload 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 NewPartialUpdateInstancePayload() *PartialUpdateInstancePayload { + this := PartialUpdateInstancePayload{} + return &this +} + +// NewPartialUpdateInstancePayloadWithDefaults instantiates a new PartialUpdateInstancePayload 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 NewPartialUpdateInstancePayloadWithDefaults() *PartialUpdateInstancePayload { + this := PartialUpdateInstancePayload{} + return &this +} + +// GetAcl returns the Acl field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetAcl() *ACL { + if o == nil || IsNil(o.Acl) { + var ret *ACL + return ret + } + return o.Acl +} + +// GetAclOk returns a tuple with the Acl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetAclOk() (*ACL, bool) { + if o == nil || IsNil(o.Acl) { + return nil, false + } + return o.Acl, true +} + +// HasAcl returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasAcl() bool { + if o != nil && !IsNil(o.Acl) { + return true + } + + return false +} + +// SetAcl gets a reference to the given ACL and assigns it to the Acl field. +func (o *PartialUpdateInstancePayload) SetAcl(v *ACL) { + o.Acl = v +} + +// GetBackupSchedule returns the BackupSchedule field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetBackupSchedule() *string { + if o == nil || IsNil(o.BackupSchedule) { + var ret *string + return ret + } + return o.BackupSchedule +} + +// GetBackupScheduleOk returns a tuple with the BackupSchedule field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetBackupScheduleOk() (*string, bool) { + if o == nil || IsNil(o.BackupSchedule) { + return nil, false + } + return o.BackupSchedule, true +} + +// HasBackupSchedule returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasBackupSchedule() bool { + if o != nil && !IsNil(o.BackupSchedule) { + return true + } + + return false +} + +// SetBackupSchedule gets a reference to the given string and assigns it to the BackupSchedule field. +func (o *PartialUpdateInstancePayload) SetBackupSchedule(v *string) { + o.BackupSchedule = v +} + +// GetFlavorId returns the FlavorId field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetFlavorId() *string { + if o == nil || IsNil(o.FlavorId) { + var ret *string + return ret + } + return o.FlavorId +} + +// GetFlavorIdOk returns a tuple with the FlavorId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetFlavorIdOk() (*string, bool) { + if o == nil || IsNil(o.FlavorId) { + return nil, false + } + return o.FlavorId, true +} + +// HasFlavorId returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasFlavorId() bool { + if o != nil && !IsNil(o.FlavorId) { + return true + } + + return false +} + +// SetFlavorId gets a reference to the given string and assigns it to the FlavorId field. +func (o *PartialUpdateInstancePayload) SetFlavorId(v *string) { + o.FlavorId = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetLabels() *map[string]string { + if o == nil || IsNil(o.Labels) { + var ret *map[string]string + return ret + } + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *PartialUpdateInstancePayload) SetLabels(v *map[string]string) { + o.Labels = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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 *PartialUpdateInstancePayload) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PartialUpdateInstancePayload) SetName(v *string) { + o.Name = v +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetOptions() *map[string]string { + if o == nil || IsNil(o.Options) { + var ret *map[string]string + return ret + } + return o.Options +} + +// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetOptionsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Options) { + return nil, false + } + return o.Options, true +} + +// HasOptions returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasOptions() bool { + if o != nil && !IsNil(o.Options) { + return true + } + + return false +} + +// SetOptions gets a reference to the given map[string]string and assigns it to the Options field. +func (o *PartialUpdateInstancePayload) SetOptions(v *map[string]string) { + o.Options = v +} + +// GetReplicas returns the Replicas field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetReplicas() *int64 { + if o == nil || IsNil(o.Replicas) { + var ret *int64 + return ret + } + return o.Replicas +} + +// GetReplicasOk returns a tuple with the Replicas field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetReplicasOk() (*int64, bool) { + if o == nil || IsNil(o.Replicas) { + return nil, false + } + return o.Replicas, true +} + +// HasReplicas returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasReplicas() bool { + if o != nil && !IsNil(o.Replicas) { + return true + } + + return false +} + +// SetReplicas gets a reference to the given int64 and assigns it to the Replicas field. +func (o *PartialUpdateInstancePayload) SetReplicas(v *int64) { + o.Replicas = v +} + +// GetStorage returns the Storage field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetStorage() *Storage { + if o == nil || IsNil(o.Storage) { + var ret *Storage + return ret + } + return o.Storage +} + +// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetStorageOk() (*Storage, bool) { + if o == nil || IsNil(o.Storage) { + return nil, false + } + return o.Storage, true +} + +// HasStorage returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasStorage() bool { + if o != nil && !IsNil(o.Storage) { + return true + } + + return false +} + +// SetStorage gets a reference to the given Storage and assigns it to the Storage field. +func (o *PartialUpdateInstancePayload) SetStorage(v *Storage) { + o.Storage = v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetVersion() *string { + if o == nil || IsNil(o.Version) { + var ret *string + return ret + } + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *PartialUpdateInstancePayload) SetVersion(v *string) { + o.Version = v +} + +func (o PartialUpdateInstancePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Acl) { + toSerialize["acl"] = o.Acl + } + if !IsNil(o.BackupSchedule) { + toSerialize["backupSchedule"] = o.BackupSchedule + } + if !IsNil(o.FlavorId) { + toSerialize["flavorId"] = o.FlavorId + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Options) { + toSerialize["options"] = o.Options + } + if !IsNil(o.Replicas) { + toSerialize["replicas"] = o.Replicas + } + if !IsNil(o.Storage) { + toSerialize["storage"] = o.Storage + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullablePartialUpdateInstancePayload struct { + value *PartialUpdateInstancePayload + isSet bool +} + +func (v NullablePartialUpdateInstancePayload) Get() *PartialUpdateInstancePayload { + return v.value +} + +func (v *NullablePartialUpdateInstancePayload) Set(val *PartialUpdateInstancePayload) { + v.value = val + v.isSet = true +} + +func (v NullablePartialUpdateInstancePayload) IsSet() bool { + return v.isSet +} + +func (v *NullablePartialUpdateInstancePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePartialUpdateInstancePayload(val *PartialUpdateInstancePayload) *NullablePartialUpdateInstancePayload { + return &NullablePartialUpdateInstancePayload{value: val, isSet: true} +} + +func (v NullablePartialUpdateInstancePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePartialUpdateInstancePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_partial_update_instance_response.go b/services/postgresflex/model_partial_update_instance_response.go index eb236786b..752510481 100644 --- a/services/postgresflex/model_partial_update_instance_response.go +++ b/services/postgresflex/model_partial_update_instance_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the PartialUpdateInstanceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PartialUpdateInstanceResponse{} + // PartialUpdateInstanceResponse struct for PartialUpdateInstanceResponse type PartialUpdateInstanceResponse struct { Item *Instance `json:"item,omitempty"` } + +// NewPartialUpdateInstanceResponse instantiates a new PartialUpdateInstanceResponse 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 NewPartialUpdateInstanceResponse() *PartialUpdateInstanceResponse { + this := PartialUpdateInstanceResponse{} + return &this +} + +// NewPartialUpdateInstanceResponseWithDefaults instantiates a new PartialUpdateInstanceResponse 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 NewPartialUpdateInstanceResponseWithDefaults() *PartialUpdateInstanceResponse { + this := PartialUpdateInstanceResponse{} + return &this +} + +// GetItem returns the Item field value if set, zero value otherwise. +func (o *PartialUpdateInstanceResponse) GetItem() *Instance { + if o == nil || IsNil(o.Item) { + var ret *Instance + return ret + } + return o.Item +} + +// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstanceResponse) GetItemOk() (*Instance, bool) { + if o == nil || IsNil(o.Item) { + return nil, false + } + return o.Item, true +} + +// HasItem returns a boolean if a field has been set. +func (o *PartialUpdateInstanceResponse) HasItem() bool { + if o != nil && !IsNil(o.Item) { + return true + } + + return false +} + +// SetItem gets a reference to the given Instance and assigns it to the Item field. +func (o *PartialUpdateInstanceResponse) SetItem(v *Instance) { + o.Item = v +} + +func (o PartialUpdateInstanceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Item) { + toSerialize["item"] = o.Item + } + return toSerialize, nil +} + +type NullablePartialUpdateInstanceResponse struct { + value *PartialUpdateInstanceResponse + isSet bool +} + +func (v NullablePartialUpdateInstanceResponse) Get() *PartialUpdateInstanceResponse { + return v.value +} + +func (v *NullablePartialUpdateInstanceResponse) Set(val *PartialUpdateInstanceResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePartialUpdateInstanceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePartialUpdateInstanceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePartialUpdateInstanceResponse(val *PartialUpdateInstanceResponse) *NullablePartialUpdateInstanceResponse { + return &NullablePartialUpdateInstanceResponse{value: val, isSet: true} +} + +func (v NullablePartialUpdateInstanceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePartialUpdateInstanceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_partial_update_user_payload.go b/services/postgresflex/model_partial_update_user_payload.go index fa0e773d4..cadf8cdeb 100644 --- a/services/postgresflex/model_partial_update_user_payload.go +++ b/services/postgresflex/model_partial_update_user_payload.go @@ -10,8 +10,143 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the PartialUpdateUserPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PartialUpdateUserPayload{} + // PartialUpdateUserPayload struct for PartialUpdateUserPayload type PartialUpdateUserPayload struct { Database *string `json:"database,omitempty"` Roles *[]string `json:"roles,omitempty"` } + +// NewPartialUpdateUserPayload instantiates a new PartialUpdateUserPayload 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 NewPartialUpdateUserPayload() *PartialUpdateUserPayload { + this := PartialUpdateUserPayload{} + return &this +} + +// NewPartialUpdateUserPayloadWithDefaults instantiates a new PartialUpdateUserPayload 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 NewPartialUpdateUserPayloadWithDefaults() *PartialUpdateUserPayload { + this := PartialUpdateUserPayload{} + return &this +} + +// GetDatabase returns the Database field value if set, zero value otherwise. +func (o *PartialUpdateUserPayload) GetDatabase() *string { + if o == nil || IsNil(o.Database) { + var ret *string + return ret + } + return o.Database +} + +// GetDatabaseOk returns a tuple with the Database field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateUserPayload) GetDatabaseOk() (*string, bool) { + if o == nil || IsNil(o.Database) { + return nil, false + } + return o.Database, true +} + +// HasDatabase returns a boolean if a field has been set. +func (o *PartialUpdateUserPayload) HasDatabase() bool { + if o != nil && !IsNil(o.Database) { + return true + } + + return false +} + +// SetDatabase gets a reference to the given string and assigns it to the Database field. +func (o *PartialUpdateUserPayload) SetDatabase(v *string) { + o.Database = v +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *PartialUpdateUserPayload) GetRoles() *[]string { + if o == nil || IsNil(o.Roles) { + var ret *[]string + return ret + } + return o.Roles +} + +// 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 *PartialUpdateUserPayload) GetRolesOk() (*[]string, bool) { + if o == nil || IsNil(o.Roles) { + return nil, false + } + return o.Roles, true +} + +// HasRoles returns a boolean if a field has been set. +func (o *PartialUpdateUserPayload) HasRoles() bool { + if o != nil && !IsNil(o.Roles) { + return true + } + + return false +} + +// SetRoles gets a reference to the given []string and assigns it to the Roles field. +func (o *PartialUpdateUserPayload) SetRoles(v *[]string) { + o.Roles = v +} + +func (o PartialUpdateUserPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Database) { + toSerialize["database"] = o.Database + } + if !IsNil(o.Roles) { + toSerialize["roles"] = o.Roles + } + return toSerialize, nil +} + +type NullablePartialUpdateUserPayload struct { + value *PartialUpdateUserPayload + isSet bool +} + +func (v NullablePartialUpdateUserPayload) Get() *PartialUpdateUserPayload { + return v.value +} + +func (v *NullablePartialUpdateUserPayload) Set(val *PartialUpdateUserPayload) { + v.value = val + v.isSet = true +} + +func (v NullablePartialUpdateUserPayload) IsSet() bool { + return v.isSet +} + +func (v *NullablePartialUpdateUserPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePartialUpdateUserPayload(val *PartialUpdateUserPayload) *NullablePartialUpdateUserPayload { + return &NullablePartialUpdateUserPayload{value: val, isSet: true} +} + +func (v NullablePartialUpdateUserPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePartialUpdateUserPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_postgres_database_parameter.go b/services/postgresflex/model_postgres_database_parameter.go index b5c804f16..ca978fe85 100644 --- a/services/postgresflex/model_postgres_database_parameter.go +++ b/services/postgresflex/model_postgres_database_parameter.go @@ -10,6 +10,13 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the PostgresDatabaseParameter type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PostgresDatabaseParameter{} + // PostgresDatabaseParameter struct for PostgresDatabaseParameter type PostgresDatabaseParameter struct { // Context of the parameter. @@ -37,3 +44,481 @@ type PostgresDatabaseParameter struct { // Value of this parameter. Value *string `json:"value,omitempty"` } + +// NewPostgresDatabaseParameter instantiates a new PostgresDatabaseParameter 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 NewPostgresDatabaseParameter() *PostgresDatabaseParameter { + this := PostgresDatabaseParameter{} + return &this +} + +// NewPostgresDatabaseParameterWithDefaults instantiates a new PostgresDatabaseParameter 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 NewPostgresDatabaseParameterWithDefaults() *PostgresDatabaseParameter { + this := PostgresDatabaseParameter{} + return &this +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *PostgresDatabaseParameter) GetContext() *string { + if o == nil || IsNil(o.Context) { + var ret *string + return ret + } + return o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PostgresDatabaseParameter) GetContextOk() (*string, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *PostgresDatabaseParameter) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given string and assigns it to the Context field. +func (o *PostgresDatabaseParameter) SetContext(v *string) { + o.Context = v +} + +// GetDataType returns the DataType field value if set, zero value otherwise. +func (o *PostgresDatabaseParameter) GetDataType() *string { + if o == nil || IsNil(o.DataType) { + var ret *string + return ret + } + return o.DataType +} + +// GetDataTypeOk returns a tuple with the DataType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PostgresDatabaseParameter) GetDataTypeOk() (*string, bool) { + if o == nil || IsNil(o.DataType) { + return nil, false + } + return o.DataType, true +} + +// HasDataType returns a boolean if a field has been set. +func (o *PostgresDatabaseParameter) HasDataType() bool { + if o != nil && !IsNil(o.DataType) { + return true + } + + return false +} + +// SetDataType gets a reference to the given string and assigns it to the DataType field. +func (o *PostgresDatabaseParameter) SetDataType(v *string) { + o.DataType = v +} + +// GetDefaultValue returns the DefaultValue field value if set, zero value otherwise. +func (o *PostgresDatabaseParameter) GetDefaultValue() *string { + if o == nil || IsNil(o.DefaultValue) { + var ret *string + return ret + } + return o.DefaultValue +} + +// GetDefaultValueOk returns a tuple with the DefaultValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PostgresDatabaseParameter) GetDefaultValueOk() (*string, bool) { + if o == nil || IsNil(o.DefaultValue) { + return nil, false + } + return o.DefaultValue, true +} + +// HasDefaultValue returns a boolean if a field has been set. +func (o *PostgresDatabaseParameter) HasDefaultValue() bool { + if o != nil && !IsNil(o.DefaultValue) { + return true + } + + return false +} + +// SetDefaultValue gets a reference to the given string and assigns it to the DefaultValue field. +func (o *PostgresDatabaseParameter) SetDefaultValue(v *string) { + o.DefaultValue = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PostgresDatabaseParameter) GetDescription() *string { + if o == nil || IsNil(o.Description) { + var ret *string + return ret + } + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PostgresDatabaseParameter) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *PostgresDatabaseParameter) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PostgresDatabaseParameter) SetDescription(v *string) { + o.Description = v +} + +// GetEdit returns the Edit field value if set, zero value otherwise. +func (o *PostgresDatabaseParameter) GetEdit() *bool { + if o == nil || IsNil(o.Edit) { + var ret *bool + return ret + } + return o.Edit +} + +// GetEditOk returns a tuple with the Edit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PostgresDatabaseParameter) GetEditOk() (*bool, bool) { + if o == nil || IsNil(o.Edit) { + return nil, false + } + return o.Edit, true +} + +// HasEdit returns a boolean if a field has been set. +func (o *PostgresDatabaseParameter) HasEdit() bool { + if o != nil && !IsNil(o.Edit) { + return true + } + + return false +} + +// SetEdit gets a reference to the given bool and assigns it to the Edit field. +func (o *PostgresDatabaseParameter) SetEdit(v *bool) { + o.Edit = v +} + +// GetMaxValue returns the MaxValue field value if set, zero value otherwise. +func (o *PostgresDatabaseParameter) GetMaxValue() *string { + if o == nil || IsNil(o.MaxValue) { + var ret *string + return ret + } + return o.MaxValue +} + +// GetMaxValueOk returns a tuple with the MaxValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PostgresDatabaseParameter) GetMaxValueOk() (*string, bool) { + if o == nil || IsNil(o.MaxValue) { + return nil, false + } + return o.MaxValue, true +} + +// HasMaxValue returns a boolean if a field has been set. +func (o *PostgresDatabaseParameter) HasMaxValue() bool { + if o != nil && !IsNil(o.MaxValue) { + return true + } + + return false +} + +// SetMaxValue gets a reference to the given string and assigns it to the MaxValue field. +func (o *PostgresDatabaseParameter) SetMaxValue(v *string) { + o.MaxValue = v +} + +// GetMinValue returns the MinValue field value if set, zero value otherwise. +func (o *PostgresDatabaseParameter) GetMinValue() *string { + if o == nil || IsNil(o.MinValue) { + var ret *string + return ret + } + return o.MinValue +} + +// GetMinValueOk returns a tuple with the MinValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PostgresDatabaseParameter) GetMinValueOk() (*string, bool) { + if o == nil || IsNil(o.MinValue) { + return nil, false + } + return o.MinValue, true +} + +// HasMinValue returns a boolean if a field has been set. +func (o *PostgresDatabaseParameter) HasMinValue() bool { + if o != nil && !IsNil(o.MinValue) { + return true + } + + return false +} + +// SetMinValue gets a reference to the given string and assigns it to the MinValue field. +func (o *PostgresDatabaseParameter) SetMinValue(v *string) { + o.MinValue = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PostgresDatabaseParameter) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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 *PostgresDatabaseParameter) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PostgresDatabaseParameter) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PostgresDatabaseParameter) SetName(v *string) { + o.Name = v +} + +// GetPendingRestart returns the PendingRestart field value if set, zero value otherwise. +func (o *PostgresDatabaseParameter) GetPendingRestart() *bool { + if o == nil || IsNil(o.PendingRestart) { + var ret *bool + return ret + } + return o.PendingRestart +} + +// GetPendingRestartOk returns a tuple with the PendingRestart field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PostgresDatabaseParameter) GetPendingRestartOk() (*bool, bool) { + if o == nil || IsNil(o.PendingRestart) { + return nil, false + } + return o.PendingRestart, true +} + +// HasPendingRestart returns a boolean if a field has been set. +func (o *PostgresDatabaseParameter) HasPendingRestart() bool { + if o != nil && !IsNil(o.PendingRestart) { + return true + } + + return false +} + +// SetPendingRestart gets a reference to the given bool and assigns it to the PendingRestart field. +func (o *PostgresDatabaseParameter) SetPendingRestart(v *bool) { + o.PendingRestart = v +} + +// GetResetValue returns the ResetValue field value if set, zero value otherwise. +func (o *PostgresDatabaseParameter) GetResetValue() *string { + if o == nil || IsNil(o.ResetValue) { + var ret *string + return ret + } + return o.ResetValue +} + +// GetResetValueOk returns a tuple with the ResetValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PostgresDatabaseParameter) GetResetValueOk() (*string, bool) { + if o == nil || IsNil(o.ResetValue) { + return nil, false + } + return o.ResetValue, true +} + +// HasResetValue returns a boolean if a field has been set. +func (o *PostgresDatabaseParameter) HasResetValue() bool { + if o != nil && !IsNil(o.ResetValue) { + return true + } + + return false +} + +// SetResetValue gets a reference to the given string and assigns it to the ResetValue field. +func (o *PostgresDatabaseParameter) SetResetValue(v *string) { + o.ResetValue = v +} + +// GetUnit returns the Unit field value if set, zero value otherwise. +func (o *PostgresDatabaseParameter) GetUnit() *string { + if o == nil || IsNil(o.Unit) { + var ret *string + return ret + } + return o.Unit +} + +// GetUnitOk returns a tuple with the Unit field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PostgresDatabaseParameter) GetUnitOk() (*string, bool) { + if o == nil || IsNil(o.Unit) { + return nil, false + } + return o.Unit, true +} + +// HasUnit returns a boolean if a field has been set. +func (o *PostgresDatabaseParameter) HasUnit() bool { + if o != nil && !IsNil(o.Unit) { + return true + } + + return false +} + +// SetUnit gets a reference to the given string and assigns it to the Unit field. +func (o *PostgresDatabaseParameter) SetUnit(v *string) { + o.Unit = v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *PostgresDatabaseParameter) GetValue() *string { + if o == nil || IsNil(o.Value) { + var ret *string + return ret + } + return o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PostgresDatabaseParameter) GetValueOk() (*string, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *PostgresDatabaseParameter) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *PostgresDatabaseParameter) SetValue(v *string) { + o.Value = v +} + +func (o PostgresDatabaseParameter) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.DataType) { + toSerialize["dataType"] = o.DataType + } + if !IsNil(o.DefaultValue) { + toSerialize["defaultValue"] = o.DefaultValue + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Edit) { + toSerialize["edit"] = o.Edit + } + if !IsNil(o.MaxValue) { + toSerialize["maxValue"] = o.MaxValue + } + if !IsNil(o.MinValue) { + toSerialize["minValue"] = o.MinValue + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.PendingRestart) { + toSerialize["pendingRestart"] = o.PendingRestart + } + if !IsNil(o.ResetValue) { + toSerialize["resetValue"] = o.ResetValue + } + if !IsNil(o.Unit) { + toSerialize["unit"] = o.Unit + } + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +type NullablePostgresDatabaseParameter struct { + value *PostgresDatabaseParameter + isSet bool +} + +func (v NullablePostgresDatabaseParameter) Get() *PostgresDatabaseParameter { + return v.value +} + +func (v *NullablePostgresDatabaseParameter) Set(val *PostgresDatabaseParameter) { + v.value = val + v.isSet = true +} + +func (v NullablePostgresDatabaseParameter) IsSet() bool { + return v.isSet +} + +func (v *NullablePostgresDatabaseParameter) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePostgresDatabaseParameter(val *PostgresDatabaseParameter) *NullablePostgresDatabaseParameter { + return &NullablePostgresDatabaseParameter{value: val, isSet: true} +} + +func (v NullablePostgresDatabaseParameter) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePostgresDatabaseParameter) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_postgres_database_parameter_response.go b/services/postgresflex/model_postgres_database_parameter_response.go index 97981e379..7d32cbafc 100644 --- a/services/postgresflex/model_postgres_database_parameter_response.go +++ b/services/postgresflex/model_postgres_database_parameter_response.go @@ -10,8 +10,108 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the PostgresDatabaseParameterResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PostgresDatabaseParameterResponse{} + // PostgresDatabaseParameterResponse struct for PostgresDatabaseParameterResponse type PostgresDatabaseParameterResponse struct { // List of the parameter Parameter *[]PostgresDatabaseParameter `json:"parameter,omitempty"` } + +// NewPostgresDatabaseParameterResponse instantiates a new PostgresDatabaseParameterResponse 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 NewPostgresDatabaseParameterResponse() *PostgresDatabaseParameterResponse { + this := PostgresDatabaseParameterResponse{} + return &this +} + +// NewPostgresDatabaseParameterResponseWithDefaults instantiates a new PostgresDatabaseParameterResponse 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 NewPostgresDatabaseParameterResponseWithDefaults() *PostgresDatabaseParameterResponse { + this := PostgresDatabaseParameterResponse{} + return &this +} + +// GetParameter returns the Parameter field value if set, zero value otherwise. +func (o *PostgresDatabaseParameterResponse) GetParameter() *[]PostgresDatabaseParameter { + if o == nil || IsNil(o.Parameter) { + var ret *[]PostgresDatabaseParameter + return ret + } + return o.Parameter +} + +// GetParameterOk returns a tuple with the Parameter field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PostgresDatabaseParameterResponse) GetParameterOk() (*[]PostgresDatabaseParameter, bool) { + if o == nil || IsNil(o.Parameter) { + return nil, false + } + return o.Parameter, true +} + +// HasParameter returns a boolean if a field has been set. +func (o *PostgresDatabaseParameterResponse) HasParameter() bool { + if o != nil && !IsNil(o.Parameter) { + return true + } + + return false +} + +// SetParameter gets a reference to the given []PostgresDatabaseParameter and assigns it to the Parameter field. +func (o *PostgresDatabaseParameterResponse) SetParameter(v *[]PostgresDatabaseParameter) { + o.Parameter = v +} + +func (o PostgresDatabaseParameterResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Parameter) { + toSerialize["parameter"] = o.Parameter + } + return toSerialize, nil +} + +type NullablePostgresDatabaseParameterResponse struct { + value *PostgresDatabaseParameterResponse + isSet bool +} + +func (v NullablePostgresDatabaseParameterResponse) Get() *PostgresDatabaseParameterResponse { + return v.value +} + +func (v *NullablePostgresDatabaseParameterResponse) Set(val *PostgresDatabaseParameterResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePostgresDatabaseParameterResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePostgresDatabaseParameterResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePostgresDatabaseParameterResponse(val *PostgresDatabaseParameterResponse) *NullablePostgresDatabaseParameterResponse { + return &NullablePostgresDatabaseParameterResponse{value: val, isSet: true} +} + +func (v NullablePostgresDatabaseParameterResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePostgresDatabaseParameterResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_reset_user_response.go b/services/postgresflex/model_reset_user_response.go index 51b35a682..ac85fe732 100644 --- a/services/postgresflex/model_reset_user_response.go +++ b/services/postgresflex/model_reset_user_response.go @@ -10,7 +10,107 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the ResetUserResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResetUserResponse{} + // ResetUserResponse struct for ResetUserResponse type ResetUserResponse struct { Item *User `json:"item,omitempty"` } + +// NewResetUserResponse instantiates a new ResetUserResponse 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 NewResetUserResponse() *ResetUserResponse { + this := ResetUserResponse{} + return &this +} + +// NewResetUserResponseWithDefaults instantiates a new ResetUserResponse 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 NewResetUserResponseWithDefaults() *ResetUserResponse { + this := ResetUserResponse{} + return &this +} + +// GetItem returns the Item field value if set, zero value otherwise. +func (o *ResetUserResponse) GetItem() *User { + if o == nil || IsNil(o.Item) { + var ret *User + return ret + } + return o.Item +} + +// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResetUserResponse) GetItemOk() (*User, bool) { + if o == nil || IsNil(o.Item) { + return nil, false + } + return o.Item, true +} + +// HasItem returns a boolean if a field has been set. +func (o *ResetUserResponse) HasItem() bool { + if o != nil && !IsNil(o.Item) { + return true + } + + return false +} + +// SetItem gets a reference to the given User and assigns it to the Item field. +func (o *ResetUserResponse) SetItem(v *User) { + o.Item = v +} + +func (o ResetUserResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Item) { + toSerialize["item"] = o.Item + } + return toSerialize, nil +} + +type NullableResetUserResponse struct { + value *ResetUserResponse + isSet bool +} + +func (v NullableResetUserResponse) Get() *ResetUserResponse { + return v.value +} + +func (v *NullableResetUserResponse) Set(val *ResetUserResponse) { + v.value = val + v.isSet = true +} + +func (v NullableResetUserResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableResetUserResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResetUserResponse(val *ResetUserResponse) *NullableResetUserResponse { + return &NullableResetUserResponse{value: val, isSet: true} +} + +func (v NullableResetUserResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResetUserResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_storage.go b/services/postgresflex/model_storage.go index 11018c7fd..668064d9c 100644 --- a/services/postgresflex/model_storage.go +++ b/services/postgresflex/model_storage.go @@ -10,8 +10,143 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the Storage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Storage{} + // Storage struct for Storage type Storage struct { Class *string `json:"class,omitempty"` Size *int64 `json:"size,omitempty"` } + +// NewStorage instantiates a new Storage 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 NewStorage() *Storage { + this := Storage{} + return &this +} + +// NewStorageWithDefaults instantiates a new Storage 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 NewStorageWithDefaults() *Storage { + this := Storage{} + return &this +} + +// GetClass returns the Class field value if set, zero value otherwise. +func (o *Storage) GetClass() *string { + if o == nil || IsNil(o.Class) { + var ret *string + return ret + } + return o.Class +} + +// GetClassOk returns a tuple with the Class field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Storage) GetClassOk() (*string, bool) { + if o == nil || IsNil(o.Class) { + return nil, false + } + return o.Class, true +} + +// HasClass returns a boolean if a field has been set. +func (o *Storage) HasClass() bool { + if o != nil && !IsNil(o.Class) { + return true + } + + return false +} + +// SetClass gets a reference to the given string and assigns it to the Class field. +func (o *Storage) SetClass(v *string) { + o.Class = v +} + +// GetSize returns the Size field value if set, zero value otherwise. +func (o *Storage) GetSize() *int64 { + if o == nil || IsNil(o.Size) { + var ret *int64 + return ret + } + return o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Storage) GetSizeOk() (*int64, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *Storage) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given int64 and assigns it to the Size field. +func (o *Storage) SetSize(v *int64) { + o.Size = v +} + +func (o Storage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Class) { + toSerialize["class"] = o.Class + } + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } + return toSerialize, nil +} + +type NullableStorage struct { + value *Storage + isSet bool +} + +func (v NullableStorage) Get() *Storage { + return v.value +} + +func (v *NullableStorage) Set(val *Storage) { + v.value = val + v.isSet = true +} + +func (v NullableStorage) IsSet() bool { + return v.isSet +} + +func (v *NullableStorage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStorage(val *Storage) *NullableStorage { + return &NullableStorage{value: val, isSet: true} +} + +func (v NullableStorage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStorage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_storage_range.go b/services/postgresflex/model_storage_range.go index 9d669a99e..d76ce584e 100644 --- a/services/postgresflex/model_storage_range.go +++ b/services/postgresflex/model_storage_range.go @@ -10,8 +10,143 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the StorageRange type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StorageRange{} + // StorageRange struct for StorageRange type StorageRange struct { Max *int64 `json:"max,omitempty"` Min *int64 `json:"min,omitempty"` } + +// NewStorageRange instantiates a new StorageRange 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 NewStorageRange() *StorageRange { + this := StorageRange{} + return &this +} + +// NewStorageRangeWithDefaults instantiates a new StorageRange 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 NewStorageRangeWithDefaults() *StorageRange { + this := StorageRange{} + return &this +} + +// GetMax returns the Max field value if set, zero value otherwise. +func (o *StorageRange) GetMax() *int64 { + if o == nil || IsNil(o.Max) { + var ret *int64 + return ret + } + return o.Max +} + +// GetMaxOk returns a tuple with the Max field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StorageRange) GetMaxOk() (*int64, bool) { + if o == nil || IsNil(o.Max) { + return nil, false + } + return o.Max, true +} + +// HasMax returns a boolean if a field has been set. +func (o *StorageRange) HasMax() bool { + if o != nil && !IsNil(o.Max) { + return true + } + + return false +} + +// SetMax gets a reference to the given int64 and assigns it to the Max field. +func (o *StorageRange) SetMax(v *int64) { + o.Max = v +} + +// GetMin returns the Min field value if set, zero value otherwise. +func (o *StorageRange) GetMin() *int64 { + if o == nil || IsNil(o.Min) { + var ret *int64 + return ret + } + return o.Min +} + +// GetMinOk returns a tuple with the Min field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StorageRange) GetMinOk() (*int64, bool) { + if o == nil || IsNil(o.Min) { + return nil, false + } + return o.Min, true +} + +// HasMin returns a boolean if a field has been set. +func (o *StorageRange) HasMin() bool { + if o != nil && !IsNil(o.Min) { + return true + } + + return false +} + +// SetMin gets a reference to the given int64 and assigns it to the Min field. +func (o *StorageRange) SetMin(v *int64) { + o.Min = v +} + +func (o StorageRange) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Max) { + toSerialize["max"] = o.Max + } + if !IsNil(o.Min) { + toSerialize["min"] = o.Min + } + return toSerialize, nil +} + +type NullableStorageRange struct { + value *StorageRange + isSet bool +} + +func (v NullableStorageRange) Get() *StorageRange { + return v.value +} + +func (v *NullableStorageRange) Set(val *StorageRange) { + v.value = val + v.isSet = true +} + +func (v NullableStorageRange) IsSet() bool { + return v.isSet +} + +func (v *NullableStorageRange) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStorageRange(val *StorageRange) *NullableStorageRange { + return &NullableStorageRange{value: val, isSet: true} +} + +func (v NullableStorageRange) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStorageRange) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_update_backup_schedule_payload.go b/services/postgresflex/model_update_backup_schedule_payload.go index d5064df67..7c2286c7a 100644 --- a/services/postgresflex/model_update_backup_schedule_payload.go +++ b/services/postgresflex/model_update_backup_schedule_payload.go @@ -10,8 +10,101 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the UpdateBackupSchedulePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateBackupSchedulePayload{} + // UpdateBackupSchedulePayload struct for UpdateBackupSchedulePayload type UpdateBackupSchedulePayload struct { // REQUIRED BackupSchedule *string `json:"backupSchedule"` } + +type _UpdateBackupSchedulePayload UpdateBackupSchedulePayload + +// NewUpdateBackupSchedulePayload instantiates a new UpdateBackupSchedulePayload 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 NewUpdateBackupSchedulePayload(backupSchedule *string) *UpdateBackupSchedulePayload { + this := UpdateBackupSchedulePayload{} + this.BackupSchedule = backupSchedule + return &this +} + +// NewUpdateBackupSchedulePayloadWithDefaults instantiates a new UpdateBackupSchedulePayload 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 NewUpdateBackupSchedulePayloadWithDefaults() *UpdateBackupSchedulePayload { + this := UpdateBackupSchedulePayload{} + return &this +} + +// GetBackupSchedule returns the BackupSchedule field value +func (o *UpdateBackupSchedulePayload) GetBackupSchedule() *string { + if o == nil { + var ret *string + return ret + } + + return o.BackupSchedule +} + +// GetBackupScheduleOk returns a tuple with the BackupSchedule field value +// and a boolean to check if the value has been set. +func (o *UpdateBackupSchedulePayload) GetBackupScheduleOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.BackupSchedule, true +} + +// SetBackupSchedule sets field value +func (o *UpdateBackupSchedulePayload) SetBackupSchedule(v *string) { + o.BackupSchedule = v +} + +func (o UpdateBackupSchedulePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["backupSchedule"] = o.BackupSchedule + return toSerialize, nil +} + +type NullableUpdateBackupSchedulePayload struct { + value *UpdateBackupSchedulePayload + isSet bool +} + +func (v NullableUpdateBackupSchedulePayload) Get() *UpdateBackupSchedulePayload { + return v.value +} + +func (v *NullableUpdateBackupSchedulePayload) Set(val *UpdateBackupSchedulePayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateBackupSchedulePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateBackupSchedulePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateBackupSchedulePayload(val *UpdateBackupSchedulePayload) *NullableUpdateBackupSchedulePayload { + return &NullableUpdateBackupSchedulePayload{value: val, isSet: true} +} + +func (v NullableUpdateBackupSchedulePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateBackupSchedulePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_update_instance_payload.go b/services/postgresflex/model_update_instance_payload.go index a8a8734bb..9bd35e981 100644 --- a/services/postgresflex/model_update_instance_payload.go +++ b/services/postgresflex/model_update_instance_payload.go @@ -10,6 +10,13 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the UpdateInstancePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateInstancePayload{} + // UpdateInstancePayload struct for UpdateInstancePayload type UpdateInstancePayload struct { Acl *ACL `json:"acl,omitempty"` @@ -23,3 +30,376 @@ type UpdateInstancePayload struct { Storage *Storage `json:"storage,omitempty"` Version *string `json:"version,omitempty"` } + +// NewUpdateInstancePayload instantiates a new UpdateInstancePayload 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 NewUpdateInstancePayload() *UpdateInstancePayload { + this := UpdateInstancePayload{} + return &this +} + +// NewUpdateInstancePayloadWithDefaults instantiates a new UpdateInstancePayload 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 NewUpdateInstancePayloadWithDefaults() *UpdateInstancePayload { + this := UpdateInstancePayload{} + return &this +} + +// GetAcl returns the Acl field value if set, zero value otherwise. +func (o *UpdateInstancePayload) GetAcl() *ACL { + if o == nil || IsNil(o.Acl) { + var ret *ACL + return ret + } + return o.Acl +} + +// GetAclOk returns a tuple with the Acl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetAclOk() (*ACL, bool) { + if o == nil || IsNil(o.Acl) { + return nil, false + } + return o.Acl, true +} + +// HasAcl returns a boolean if a field has been set. +func (o *UpdateInstancePayload) HasAcl() bool { + if o != nil && !IsNil(o.Acl) { + return true + } + + return false +} + +// SetAcl gets a reference to the given ACL and assigns it to the Acl field. +func (o *UpdateInstancePayload) SetAcl(v *ACL) { + o.Acl = v +} + +// GetBackupSchedule returns the BackupSchedule field value if set, zero value otherwise. +func (o *UpdateInstancePayload) GetBackupSchedule() *string { + if o == nil || IsNil(o.BackupSchedule) { + var ret *string + return ret + } + return o.BackupSchedule +} + +// GetBackupScheduleOk returns a tuple with the BackupSchedule field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetBackupScheduleOk() (*string, bool) { + if o == nil || IsNil(o.BackupSchedule) { + return nil, false + } + return o.BackupSchedule, true +} + +// HasBackupSchedule returns a boolean if a field has been set. +func (o *UpdateInstancePayload) HasBackupSchedule() bool { + if o != nil && !IsNil(o.BackupSchedule) { + return true + } + + return false +} + +// SetBackupSchedule gets a reference to the given string and assigns it to the BackupSchedule field. +func (o *UpdateInstancePayload) SetBackupSchedule(v *string) { + o.BackupSchedule = v +} + +// GetFlavorId returns the FlavorId field value if set, zero value otherwise. +func (o *UpdateInstancePayload) GetFlavorId() *string { + if o == nil || IsNil(o.FlavorId) { + var ret *string + return ret + } + return o.FlavorId +} + +// GetFlavorIdOk returns a tuple with the FlavorId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetFlavorIdOk() (*string, bool) { + if o == nil || IsNil(o.FlavorId) { + return nil, false + } + return o.FlavorId, true +} + +// HasFlavorId returns a boolean if a field has been set. +func (o *UpdateInstancePayload) HasFlavorId() bool { + if o != nil && !IsNil(o.FlavorId) { + return true + } + + return false +} + +// SetFlavorId gets a reference to the given string and assigns it to the FlavorId field. +func (o *UpdateInstancePayload) SetFlavorId(v *string) { + o.FlavorId = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *UpdateInstancePayload) GetLabels() *map[string]string { + if o == nil || IsNil(o.Labels) { + var ret *map[string]string + return ret + } + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetLabelsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *UpdateInstancePayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *UpdateInstancePayload) SetLabels(v *map[string]string) { + o.Labels = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdateInstancePayload) GetName() *string { + if o == nil || IsNil(o.Name) { + var ret *string + return ret + } + return o.Name +} + +// 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 *UpdateInstancePayload) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpdateInstancePayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdateInstancePayload) SetName(v *string) { + o.Name = v +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *UpdateInstancePayload) GetOptions() *map[string]string { + if o == nil || IsNil(o.Options) { + var ret *map[string]string + return ret + } + return o.Options +} + +// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetOptionsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Options) { + return nil, false + } + return o.Options, true +} + +// HasOptions returns a boolean if a field has been set. +func (o *UpdateInstancePayload) HasOptions() bool { + if o != nil && !IsNil(o.Options) { + return true + } + + return false +} + +// SetOptions gets a reference to the given map[string]string and assigns it to the Options field. +func (o *UpdateInstancePayload) SetOptions(v *map[string]string) { + o.Options = v +} + +// GetReplicas returns the Replicas field value if set, zero value otherwise. +func (o *UpdateInstancePayload) GetReplicas() *int64 { + if o == nil || IsNil(o.Replicas) { + var ret *int64 + return ret + } + return o.Replicas +} + +// GetReplicasOk returns a tuple with the Replicas field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetReplicasOk() (*int64, bool) { + if o == nil || IsNil(o.Replicas) { + return nil, false + } + return o.Replicas, true +} + +// HasReplicas returns a boolean if a field has been set. +func (o *UpdateInstancePayload) HasReplicas() bool { + if o != nil && !IsNil(o.Replicas) { + return true + } + + return false +} + +// SetReplicas gets a reference to the given int64 and assigns it to the Replicas field. +func (o *UpdateInstancePayload) SetReplicas(v *int64) { + o.Replicas = v +} + +// GetStorage returns the Storage field value if set, zero value otherwise. +func (o *UpdateInstancePayload) GetStorage() *Storage { + if o == nil || IsNil(o.Storage) { + var ret *Storage + return ret + } + return o.Storage +} + +// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetStorageOk() (*Storage, bool) { + if o == nil || IsNil(o.Storage) { + return nil, false + } + return o.Storage, true +} + +// HasStorage returns a boolean if a field has been set. +func (o *UpdateInstancePayload) HasStorage() bool { + if o != nil && !IsNil(o.Storage) { + return true + } + + return false +} + +// SetStorage gets a reference to the given Storage and assigns it to the Storage field. +func (o *UpdateInstancePayload) SetStorage(v *Storage) { + o.Storage = v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *UpdateInstancePayload) GetVersion() *string { + if o == nil || IsNil(o.Version) { + var ret *string + return ret + } + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *UpdateInstancePayload) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *UpdateInstancePayload) SetVersion(v *string) { + o.Version = v +} + +func (o UpdateInstancePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Acl) { + toSerialize["acl"] = o.Acl + } + if !IsNil(o.BackupSchedule) { + toSerialize["backupSchedule"] = o.BackupSchedule + } + if !IsNil(o.FlavorId) { + toSerialize["flavorId"] = o.FlavorId + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Options) { + toSerialize["options"] = o.Options + } + if !IsNil(o.Replicas) { + toSerialize["replicas"] = o.Replicas + } + if !IsNil(o.Storage) { + toSerialize["storage"] = o.Storage + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullableUpdateInstancePayload struct { + value *UpdateInstancePayload + isSet bool +} + +func (v NullableUpdateInstancePayload) Get() *UpdateInstancePayload { + return v.value +} + +func (v *NullableUpdateInstancePayload) Set(val *UpdateInstancePayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateInstancePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateInstancePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateInstancePayload(val *UpdateInstancePayload) *NullableUpdateInstancePayload { + return &NullableUpdateInstancePayload{value: val, isSet: true} +} + +func (v NullableUpdateInstancePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateInstancePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_update_user_payload.go b/services/postgresflex/model_update_user_payload.go index 3c8605bf8..9361c7d35 100644 --- a/services/postgresflex/model_update_user_payload.go +++ b/services/postgresflex/model_update_user_payload.go @@ -10,8 +10,143 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the UpdateUserPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateUserPayload{} + // UpdateUserPayload struct for UpdateUserPayload type UpdateUserPayload struct { Database *string `json:"database,omitempty"` Roles *[]string `json:"roles,omitempty"` } + +// NewUpdateUserPayload instantiates a new UpdateUserPayload 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 NewUpdateUserPayload() *UpdateUserPayload { + this := UpdateUserPayload{} + return &this +} + +// NewUpdateUserPayloadWithDefaults instantiates a new UpdateUserPayload 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 NewUpdateUserPayloadWithDefaults() *UpdateUserPayload { + this := UpdateUserPayload{} + return &this +} + +// GetDatabase returns the Database field value if set, zero value otherwise. +func (o *UpdateUserPayload) GetDatabase() *string { + if o == nil || IsNil(o.Database) { + var ret *string + return ret + } + return o.Database +} + +// GetDatabaseOk returns a tuple with the Database field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateUserPayload) GetDatabaseOk() (*string, bool) { + if o == nil || IsNil(o.Database) { + return nil, false + } + return o.Database, true +} + +// HasDatabase returns a boolean if a field has been set. +func (o *UpdateUserPayload) HasDatabase() bool { + if o != nil && !IsNil(o.Database) { + return true + } + + return false +} + +// SetDatabase gets a reference to the given string and assigns it to the Database field. +func (o *UpdateUserPayload) SetDatabase(v *string) { + o.Database = v +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *UpdateUserPayload) GetRoles() *[]string { + if o == nil || IsNil(o.Roles) { + var ret *[]string + return ret + } + return o.Roles +} + +// 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 *UpdateUserPayload) GetRolesOk() (*[]string, bool) { + if o == nil || IsNil(o.Roles) { + return nil, false + } + return o.Roles, true +} + +// HasRoles returns a boolean if a field has been set. +func (o *UpdateUserPayload) HasRoles() bool { + if o != nil && !IsNil(o.Roles) { + return true + } + + return false +} + +// SetRoles gets a reference to the given []string and assigns it to the Roles field. +func (o *UpdateUserPayload) SetRoles(v *[]string) { + o.Roles = v +} + +func (o UpdateUserPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Database) { + toSerialize["database"] = o.Database + } + if !IsNil(o.Roles) { + toSerialize["roles"] = o.Roles + } + return toSerialize, nil +} + +type NullableUpdateUserPayload struct { + value *UpdateUserPayload + isSet bool +} + +func (v NullableUpdateUserPayload) Get() *UpdateUserPayload { + return v.value +} + +func (v *NullableUpdateUserPayload) Set(val *UpdateUserPayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateUserPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateUserPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateUserPayload(val *UpdateUserPayload) *NullableUpdateUserPayload { + return &NullableUpdateUserPayload{value: val, isSet: true} +} + +func (v NullableUpdateUserPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateUserPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_user.go b/services/postgresflex/model_user.go index ca781e338..197537592 100644 --- a/services/postgresflex/model_user.go +++ b/services/postgresflex/model_user.go @@ -10,6 +10,13 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the User type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &User{} + // User struct for User type User struct { Database *string `json:"database,omitempty"` @@ -21,3 +28,341 @@ type User struct { Uri *string `json:"uri,omitempty"` Username *string `json:"username,omitempty"` } + +// NewUser instantiates a new User 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 NewUser() *User { + this := User{} + return &this +} + +// NewUserWithDefaults instantiates a new User 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 NewUserWithDefaults() *User { + this := User{} + return &this +} + +// GetDatabase returns the Database field value if set, zero value otherwise. +func (o *User) GetDatabase() *string { + if o == nil || IsNil(o.Database) { + var ret *string + return ret + } + return o.Database +} + +// GetDatabaseOk returns a tuple with the Database field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetDatabaseOk() (*string, bool) { + if o == nil || IsNil(o.Database) { + return nil, false + } + return o.Database, true +} + +// HasDatabase returns a boolean if a field has been set. +func (o *User) HasDatabase() bool { + if o != nil && !IsNil(o.Database) { + return true + } + + return false +} + +// SetDatabase gets a reference to the given string and assigns it to the Database field. +func (o *User) SetDatabase(v *string) { + o.Database = v +} + +// GetHost returns the Host field value if set, zero value otherwise. +func (o *User) GetHost() *string { + if o == nil || IsNil(o.Host) { + var ret *string + return ret + } + return o.Host +} + +// GetHostOk returns a tuple with the Host field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetHostOk() (*string, bool) { + if o == nil || IsNil(o.Host) { + return nil, false + } + return o.Host, true +} + +// HasHost returns a boolean if a field has been set. +func (o *User) HasHost() bool { + if o != nil && !IsNil(o.Host) { + return true + } + + return false +} + +// SetHost gets a reference to the given string and assigns it to the Host field. +func (o *User) SetHost(v *string) { + o.Host = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *User) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + return ret + } + return o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *User) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *User) SetId(v *string) { + o.Id = v +} + +// GetPassword returns the Password field value if set, zero value otherwise. +func (o *User) GetPassword() *string { + if o == nil || IsNil(o.Password) { + var ret *string + return ret + } + return o.Password +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetPasswordOk() (*string, bool) { + if o == nil || IsNil(o.Password) { + return nil, false + } + return o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *User) HasPassword() bool { + if o != nil && !IsNil(o.Password) { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *User) SetPassword(v *string) { + o.Password = v +} + +// GetPort returns the Port field value if set, zero value otherwise. +func (o *User) GetPort() *int64 { + if o == nil || IsNil(o.Port) { + var ret *int64 + return ret + } + return o.Port +} + +// GetPortOk returns a tuple with the Port field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetPortOk() (*int64, bool) { + if o == nil || IsNil(o.Port) { + return nil, false + } + return o.Port, true +} + +// HasPort returns a boolean if a field has been set. +func (o *User) HasPort() bool { + if o != nil && !IsNil(o.Port) { + return true + } + + return false +} + +// SetPort gets a reference to the given int64 and assigns it to the Port field. +func (o *User) SetPort(v *int64) { + o.Port = v +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *User) GetRoles() *[]string { + if o == nil || IsNil(o.Roles) { + var ret *[]string + return ret + } + return o.Roles +} + +// 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 *User) GetRolesOk() (*[]string, bool) { + if o == nil || IsNil(o.Roles) { + return nil, false + } + return o.Roles, true +} + +// HasRoles returns a boolean if a field has been set. +func (o *User) HasRoles() bool { + if o != nil && !IsNil(o.Roles) { + return true + } + + return false +} + +// SetRoles gets a reference to the given []string and assigns it to the Roles field. +func (o *User) SetRoles(v *[]string) { + o.Roles = v +} + +// GetUri returns the Uri field value if set, zero value otherwise. +func (o *User) GetUri() *string { + if o == nil || IsNil(o.Uri) { + var ret *string + return ret + } + return o.Uri +} + +// GetUriOk returns a tuple with the Uri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetUriOk() (*string, bool) { + if o == nil || IsNil(o.Uri) { + return nil, false + } + return o.Uri, true +} + +// HasUri returns a boolean if a field has been set. +func (o *User) HasUri() bool { + if o != nil && !IsNil(o.Uri) { + return true + } + + return false +} + +// SetUri gets a reference to the given string and assigns it to the Uri field. +func (o *User) SetUri(v *string) { + o.Uri = v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *User) GetUsername() *string { + if o == nil || IsNil(o.Username) { + var ret *string + return ret + } + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *User) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *User) SetUsername(v *string) { + o.Username = v +} + +func (o User) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Database) { + toSerialize["database"] = o.Database + } + if !IsNil(o.Host) { + toSerialize["host"] = o.Host + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Password) { + toSerialize["password"] = o.Password + } + if !IsNil(o.Port) { + toSerialize["port"] = o.Port + } + if !IsNil(o.Roles) { + toSerialize["roles"] = o.Roles + } + if !IsNil(o.Uri) { + toSerialize["uri"] = o.Uri + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +type NullableUser struct { + value *User + isSet bool +} + +func (v NullableUser) Get() *User { + return v.value +} + +func (v *NullableUser) Set(val *User) { + v.value = val + v.isSet = true +} + +func (v NullableUser) IsSet() bool { + return v.isSet +} + +func (v *NullableUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUser(val *User) *NullableUser { + return &NullableUser{value: val, isSet: true} +} + +func (v NullableUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/postgresflex/model_user_response.go b/services/postgresflex/model_user_response.go index da9697f6f..de124b7d6 100644 --- a/services/postgresflex/model_user_response.go +++ b/services/postgresflex/model_user_response.go @@ -10,6 +10,13 @@ API version: 1.0.0 package postgresflex +import ( + "encoding/json" +) + +// checks if the UserResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserResponse{} + // UserResponse struct for UserResponse type UserResponse struct { Host *string `json:"host,omitempty"` @@ -18,3 +25,236 @@ type UserResponse struct { Roles *[]string `json:"roles,omitempty"` Username *string `json:"username,omitempty"` } + +// NewUserResponse instantiates a new UserResponse 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 NewUserResponse() *UserResponse { + this := UserResponse{} + return &this +} + +// NewUserResponseWithDefaults instantiates a new UserResponse 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 NewUserResponseWithDefaults() *UserResponse { + this := UserResponse{} + return &this +} + +// GetHost returns the Host field value if set, zero value otherwise. +func (o *UserResponse) GetHost() *string { + if o == nil || IsNil(o.Host) { + var ret *string + return ret + } + return o.Host +} + +// GetHostOk returns a tuple with the Host field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserResponse) GetHostOk() (*string, bool) { + if o == nil || IsNil(o.Host) { + return nil, false + } + return o.Host, true +} + +// HasHost returns a boolean if a field has been set. +func (o *UserResponse) HasHost() bool { + if o != nil && !IsNil(o.Host) { + return true + } + + return false +} + +// SetHost gets a reference to the given string and assigns it to the Host field. +func (o *UserResponse) SetHost(v *string) { + o.Host = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *UserResponse) GetId() *string { + if o == nil || IsNil(o.Id) { + var ret *string + return ret + } + return o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserResponse) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *UserResponse) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *UserResponse) SetId(v *string) { + o.Id = v +} + +// GetPort returns the Port field value if set, zero value otherwise. +func (o *UserResponse) GetPort() *int64 { + if o == nil || IsNil(o.Port) { + var ret *int64 + return ret + } + return o.Port +} + +// GetPortOk returns a tuple with the Port field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserResponse) GetPortOk() (*int64, bool) { + if o == nil || IsNil(o.Port) { + return nil, false + } + return o.Port, true +} + +// HasPort returns a boolean if a field has been set. +func (o *UserResponse) HasPort() bool { + if o != nil && !IsNil(o.Port) { + return true + } + + return false +} + +// SetPort gets a reference to the given int64 and assigns it to the Port field. +func (o *UserResponse) SetPort(v *int64) { + o.Port = v +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *UserResponse) GetRoles() *[]string { + if o == nil || IsNil(o.Roles) { + var ret *[]string + return ret + } + return o.Roles +} + +// 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 *UserResponse) GetRolesOk() (*[]string, bool) { + if o == nil || IsNil(o.Roles) { + return nil, false + } + return o.Roles, true +} + +// HasRoles returns a boolean if a field has been set. +func (o *UserResponse) HasRoles() bool { + if o != nil && !IsNil(o.Roles) { + return true + } + + return false +} + +// SetRoles gets a reference to the given []string and assigns it to the Roles field. +func (o *UserResponse) SetRoles(v *[]string) { + o.Roles = v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *UserResponse) GetUsername() *string { + if o == nil || IsNil(o.Username) { + var ret *string + return ret + } + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserResponse) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *UserResponse) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *UserResponse) SetUsername(v *string) { + o.Username = v +} + +func (o UserResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Host) { + toSerialize["host"] = o.Host + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Port) { + toSerialize["port"] = o.Port + } + if !IsNil(o.Roles) { + toSerialize["roles"] = o.Roles + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +type NullableUserResponse struct { + value *UserResponse + isSet bool +} + +func (v NullableUserResponse) Get() *UserResponse { + return v.value +} + +func (v *NullableUserResponse) Set(val *UserResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUserResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUserResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserResponse(val *UserResponse) *NullableUserResponse { + return &NullableUserResponse{value: val, isSet: true} +} + +func (v NullableUserResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +}