Files
sdk/model_iam_send_output.go

191 lines
4.6 KiB
Go

/*
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package hanzoai
import (
"encoding/json"
)
// checks if the IamSendOutput type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &IamSendOutput{}
// IamSendOutput struct for IamSendOutput
type IamSendOutput struct {
Sent *bool `json:"sent,omitempty"`
To *string `json:"to,omitempty"`
AdditionalProperties map[string]interface{}
}
type _IamSendOutput IamSendOutput
// NewIamSendOutput instantiates a new IamSendOutput 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 NewIamSendOutput() *IamSendOutput {
this := IamSendOutput{}
return &this
}
// NewIamSendOutputWithDefaults instantiates a new IamSendOutput 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 NewIamSendOutputWithDefaults() *IamSendOutput {
this := IamSendOutput{}
return &this
}
// GetSent returns the Sent field value if set, zero value otherwise.
func (o *IamSendOutput) GetSent() bool {
if o == nil || IsNil(o.Sent) {
var ret bool
return ret
}
return *o.Sent
}
// GetSentOk returns a tuple with the Sent field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamSendOutput) GetSentOk() (*bool, bool) {
if o == nil || IsNil(o.Sent) {
return nil, false
}
return o.Sent, true
}
// HasSent returns a boolean if a field has been set.
func (o *IamSendOutput) HasSent() bool {
if o != nil && !IsNil(o.Sent) {
return true
}
return false
}
// SetSent gets a reference to the given bool and assigns it to the Sent field.
func (o *IamSendOutput) SetSent(v bool) {
o.Sent = &v
}
// GetTo returns the To field value if set, zero value otherwise.
func (o *IamSendOutput) GetTo() string {
if o == nil || IsNil(o.To) {
var ret string
return ret
}
return *o.To
}
// GetToOk returns a tuple with the To field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IamSendOutput) GetToOk() (*string, bool) {
if o == nil || IsNil(o.To) {
return nil, false
}
return o.To, true
}
// HasTo returns a boolean if a field has been set.
func (o *IamSendOutput) HasTo() bool {
if o != nil && !IsNil(o.To) {
return true
}
return false
}
// SetTo gets a reference to the given string and assigns it to the To field.
func (o *IamSendOutput) SetTo(v string) {
o.To = &v
}
func (o IamSendOutput) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o IamSendOutput) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Sent) {
toSerialize["sent"] = o.Sent
}
if !IsNil(o.To) {
toSerialize["to"] = o.To
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *IamSendOutput) UnmarshalJSON(data []byte) (err error) {
varIamSendOutput := _IamSendOutput{}
err = json.Unmarshal(data, &varIamSendOutput)
if err != nil {
return err
}
*o = IamSendOutput(varIamSendOutput)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "sent")
delete(additionalProperties, "to")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableIamSendOutput struct {
value *IamSendOutput
isSet bool
}
func (v NullableIamSendOutput) Get() *IamSendOutput {
return v.value
}
func (v *NullableIamSendOutput) Set(val *IamSendOutput) {
v.value = val
v.isSet = true
}
func (v NullableIamSendOutput) IsSet() bool {
return v.isSet
}
func (v *NullableIamSendOutput) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableIamSendOutput(val *IamSendOutput) *NullableIamSendOutput {
return &NullableIamSendOutput{value: val, isSet: true}
}
func (v NullableIamSendOutput) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableIamSendOutput) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}