/* STACKIT MSSQL Service API This is the documentation for the STACKIT MSSQL service API version: 3alpha1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package sqlserverflexalpha import ( "encoding/json" ) // checks if the TriggerRestoreRequestPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &TriggerRestoreRequestPayload{} /* types and functions for name */ // isNotNullableString type TriggerRestoreRequestPayloadGetNameAttributeType = *string func getTriggerRestoreRequestPayloadGetNameAttributeTypeOk(arg TriggerRestoreRequestPayloadGetNameAttributeType) (ret TriggerRestoreRequestPayloadGetNameRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setTriggerRestoreRequestPayloadGetNameAttributeType(arg *TriggerRestoreRequestPayloadGetNameAttributeType, val TriggerRestoreRequestPayloadGetNameRetType) { *arg = &val } type TriggerRestoreRequestPayloadGetNameArgType = string type TriggerRestoreRequestPayloadGetNameRetType = string /* types and functions for restoreDateTime */ // isNotNullableString type TriggerRestoreRequestPayloadGetRestoreDateTimeAttributeType = *string func getTriggerRestoreRequestPayloadGetRestoreDateTimeAttributeTypeOk(arg TriggerRestoreRequestPayloadGetRestoreDateTimeAttributeType) (ret TriggerRestoreRequestPayloadGetRestoreDateTimeRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setTriggerRestoreRequestPayloadGetRestoreDateTimeAttributeType(arg *TriggerRestoreRequestPayloadGetRestoreDateTimeAttributeType, val TriggerRestoreRequestPayloadGetRestoreDateTimeRetType) { *arg = &val } type TriggerRestoreRequestPayloadGetRestoreDateTimeArgType = string type TriggerRestoreRequestPayloadGetRestoreDateTimeRetType = string // TriggerRestoreRequestPayload struct for TriggerRestoreRequestPayload type TriggerRestoreRequestPayload struct { // The name of the database. // REQUIRED Name TriggerRestoreRequestPayloadGetNameAttributeType `json:"name" required:"true"` // the time for the restore it will be calculated between first backup and last backup // REQUIRED RestoreDateTime TriggerRestoreRequestPayloadGetRestoreDateTimeAttributeType `json:"restoreDateTime" required:"true"` } type _TriggerRestoreRequestPayload TriggerRestoreRequestPayload // NewTriggerRestoreRequestPayload instantiates a new TriggerRestoreRequestPayload 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 NewTriggerRestoreRequestPayload(name TriggerRestoreRequestPayloadGetNameArgType, restoreDateTime TriggerRestoreRequestPayloadGetRestoreDateTimeArgType) *TriggerRestoreRequestPayload { this := TriggerRestoreRequestPayload{} setTriggerRestoreRequestPayloadGetNameAttributeType(&this.Name, name) setTriggerRestoreRequestPayloadGetRestoreDateTimeAttributeType(&this.RestoreDateTime, restoreDateTime) return &this } // NewTriggerRestoreRequestPayloadWithDefaults instantiates a new TriggerRestoreRequestPayload 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 NewTriggerRestoreRequestPayloadWithDefaults() *TriggerRestoreRequestPayload { this := TriggerRestoreRequestPayload{} return &this } // GetName returns the Name field value func (o *TriggerRestoreRequestPayload) GetName() (ret TriggerRestoreRequestPayloadGetNameRetType) { ret, _ = o.GetNameOk() return ret } // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. func (o *TriggerRestoreRequestPayload) GetNameOk() (ret TriggerRestoreRequestPayloadGetNameRetType, ok bool) { return getTriggerRestoreRequestPayloadGetNameAttributeTypeOk(o.Name) } // SetName sets field value func (o *TriggerRestoreRequestPayload) SetName(v TriggerRestoreRequestPayloadGetNameRetType) { setTriggerRestoreRequestPayloadGetNameAttributeType(&o.Name, v) } // GetRestoreDateTime returns the RestoreDateTime field value func (o *TriggerRestoreRequestPayload) GetRestoreDateTime() (ret TriggerRestoreRequestPayloadGetRestoreDateTimeRetType) { ret, _ = o.GetRestoreDateTimeOk() return ret } // GetRestoreDateTimeOk returns a tuple with the RestoreDateTime field value // and a boolean to check if the value has been set. func (o *TriggerRestoreRequestPayload) GetRestoreDateTimeOk() (ret TriggerRestoreRequestPayloadGetRestoreDateTimeRetType, ok bool) { return getTriggerRestoreRequestPayloadGetRestoreDateTimeAttributeTypeOk(o.RestoreDateTime) } // SetRestoreDateTime sets field value func (o *TriggerRestoreRequestPayload) SetRestoreDateTime(v TriggerRestoreRequestPayloadGetRestoreDateTimeRetType) { setTriggerRestoreRequestPayloadGetRestoreDateTimeAttributeType(&o.RestoreDateTime, v) } func (o TriggerRestoreRequestPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getTriggerRestoreRequestPayloadGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } if val, ok := getTriggerRestoreRequestPayloadGetRestoreDateTimeAttributeTypeOk(o.RestoreDateTime); ok { toSerialize["RestoreDateTime"] = val } return toSerialize, nil } type NullableTriggerRestoreRequestPayload struct { value *TriggerRestoreRequestPayload isSet bool } func (v NullableTriggerRestoreRequestPayload) Get() *TriggerRestoreRequestPayload { return v.value } func (v *NullableTriggerRestoreRequestPayload) Set(val *TriggerRestoreRequestPayload) { v.value = val v.isSet = true } func (v NullableTriggerRestoreRequestPayload) IsSet() bool { return v.isSet } func (v *NullableTriggerRestoreRequestPayload) Unset() { v.value = nil v.isSet = false } func NewNullableTriggerRestoreRequestPayload(val *TriggerRestoreRequestPayload) *NullableTriggerRestoreRequestPayload { return &NullableTriggerRestoreRequestPayload{value: val, isSet: true} } func (v NullableTriggerRestoreRequestPayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableTriggerRestoreRequestPayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }