terraform-provider-stackitp.../pkg/postgresflexalpha/model_protect_instance_request_payload.go

126 lines
4.4 KiB
Go

/*
PostgreSQL Flex API
This is the documentation for the STACKIT Postgres Flex service
API version: 3alpha1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package postgresflexalpha
import (
"encoding/json"
)
// checks if the ProtectInstanceRequestPayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ProtectInstanceRequestPayload{}
/*
types and functions for isDeletable
*/
// isBoolean
type ProtectInstanceRequestPayloadgetIsDeletableAttributeType = *bool
type ProtectInstanceRequestPayloadgetIsDeletableArgType = bool
type ProtectInstanceRequestPayloadgetIsDeletableRetType = bool
func getProtectInstanceRequestPayloadgetIsDeletableAttributeTypeOk(arg ProtectInstanceRequestPayloadgetIsDeletableAttributeType) (ret ProtectInstanceRequestPayloadgetIsDeletableRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setProtectInstanceRequestPayloadgetIsDeletableAttributeType(arg *ProtectInstanceRequestPayloadgetIsDeletableAttributeType, val ProtectInstanceRequestPayloadgetIsDeletableRetType) {
*arg = &val
}
// ProtectInstanceRequestPayload struct for ProtectInstanceRequestPayload
type ProtectInstanceRequestPayload struct {
// Protect instance from deletion.
// REQUIRED
IsDeletable ProtectInstanceRequestPayloadgetIsDeletableAttributeType `json:"isDeletable" required:"true"`
}
type _ProtectInstanceRequestPayload ProtectInstanceRequestPayload
// NewProtectInstanceRequestPayload instantiates a new ProtectInstanceRequestPayload 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 NewProtectInstanceRequestPayload(isDeletable ProtectInstanceRequestPayloadgetIsDeletableArgType) *ProtectInstanceRequestPayload {
this := ProtectInstanceRequestPayload{}
setProtectInstanceRequestPayloadgetIsDeletableAttributeType(&this.IsDeletable, isDeletable)
return &this
}
// NewProtectInstanceRequestPayloadWithDefaults instantiates a new ProtectInstanceRequestPayload 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 NewProtectInstanceRequestPayloadWithDefaults() *ProtectInstanceRequestPayload {
this := ProtectInstanceRequestPayload{}
return &this
}
// GetIsDeletable returns the IsDeletable field value
func (o *ProtectInstanceRequestPayload) GetIsDeletable() (ret ProtectInstanceRequestPayloadgetIsDeletableRetType) {
ret, _ = o.GetIsDeletableOk()
return ret
}
// GetIsDeletableOk returns a tuple with the IsDeletable field value
// and a boolean to check if the value has been set.
func (o *ProtectInstanceRequestPayload) GetIsDeletableOk() (ret ProtectInstanceRequestPayloadgetIsDeletableRetType, ok bool) {
return getProtectInstanceRequestPayloadgetIsDeletableAttributeTypeOk(o.IsDeletable)
}
// SetIsDeletable sets field value
func (o *ProtectInstanceRequestPayload) SetIsDeletable(v ProtectInstanceRequestPayloadgetIsDeletableRetType) {
setProtectInstanceRequestPayloadgetIsDeletableAttributeType(&o.IsDeletable, v)
}
func (o ProtectInstanceRequestPayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getProtectInstanceRequestPayloadgetIsDeletableAttributeTypeOk(o.IsDeletable); ok {
toSerialize["IsDeletable"] = val
}
return toSerialize, nil
}
type NullableProtectInstanceRequestPayload struct {
value *ProtectInstanceRequestPayload
isSet bool
}
func (v NullableProtectInstanceRequestPayload) Get() *ProtectInstanceRequestPayload {
return v.value
}
func (v *NullableProtectInstanceRequestPayload) Set(val *ProtectInstanceRequestPayload) {
v.value = val
v.isSet = true
}
func (v NullableProtectInstanceRequestPayload) IsSet() bool {
return v.isSet
}
func (v *NullableProtectInstanceRequestPayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProtectInstanceRequestPayload(val *ProtectInstanceRequestPayload) *NullableProtectInstanceRequestPayload {
return &NullableProtectInstanceRequestPayload{value: val, isSet: true}
}
func (v NullableProtectInstanceRequestPayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProtectInstanceRequestPayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}