Files
sdk/model_hf_sibling.go

191 lines
4.5 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 HfSibling type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &HfSibling{}
// HfSibling struct for HfSibling
type HfSibling struct {
Rfilename *string `json:"rfilename,omitempty"`
Size *int32 `json:"size,omitempty"`
AdditionalProperties map[string]interface{}
}
type _HfSibling HfSibling
// NewHfSibling instantiates a new HfSibling 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 NewHfSibling() *HfSibling {
this := HfSibling{}
return &this
}
// NewHfSiblingWithDefaults instantiates a new HfSibling 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 NewHfSiblingWithDefaults() *HfSibling {
this := HfSibling{}
return &this
}
// GetRfilename returns the Rfilename field value if set, zero value otherwise.
func (o *HfSibling) GetRfilename() string {
if o == nil || IsNil(o.Rfilename) {
var ret string
return ret
}
return *o.Rfilename
}
// GetRfilenameOk returns a tuple with the Rfilename field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HfSibling) GetRfilenameOk() (*string, bool) {
if o == nil || IsNil(o.Rfilename) {
return nil, false
}
return o.Rfilename, true
}
// HasRfilename returns a boolean if a field has been set.
func (o *HfSibling) HasRfilename() bool {
if o != nil && !IsNil(o.Rfilename) {
return true
}
return false
}
// SetRfilename gets a reference to the given string and assigns it to the Rfilename field.
func (o *HfSibling) SetRfilename(v string) {
o.Rfilename = &v
}
// GetSize returns the Size field value if set, zero value otherwise.
func (o *HfSibling) GetSize() int32 {
if o == nil || IsNil(o.Size) {
var ret int32
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 *HfSibling) GetSizeOk() (*int32, 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 *HfSibling) HasSize() bool {
if o != nil && !IsNil(o.Size) {
return true
}
return false
}
// SetSize gets a reference to the given int32 and assigns it to the Size field.
func (o *HfSibling) SetSize(v int32) {
o.Size = &v
}
func (o HfSibling) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o HfSibling) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Rfilename) {
toSerialize["rfilename"] = o.Rfilename
}
if !IsNil(o.Size) {
toSerialize["size"] = o.Size
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *HfSibling) UnmarshalJSON(data []byte) (err error) {
varHfSibling := _HfSibling{}
err = json.Unmarshal(data, &varHfSibling)
if err != nil {
return err
}
*o = HfSibling(varHfSibling)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "rfilename")
delete(additionalProperties, "size")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableHfSibling struct {
value *HfSibling
isSet bool
}
func (v NullableHfSibling) Get() *HfSibling {
return v.value
}
func (v *NullableHfSibling) Set(val *HfSibling) {
v.value = val
v.isSet = true
}
func (v NullableHfSibling) IsSet() bool {
return v.isSet
}
func (v *NullableHfSibling) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableHfSibling(val *HfSibling) *NullableHfSibling {
return &NullableHfSibling{value: val, isSet: true}
}
func (v NullableHfSibling) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableHfSibling) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}