Files
sdk/model_space_space_item.go

193 lines
4.9 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 SpaceSpaceItem type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SpaceSpaceItem{}
// SpaceSpaceItem struct for SpaceSpaceItem
type SpaceSpaceItem struct {
// CreatedAt is when the space was made, in unix seconds.
CreatedAt *int64 `json:"createdAt,omitempty"`
// Name is the space's name, as the org created it.
Name *string `json:"name,omitempty"`
AdditionalProperties map[string]interface{}
}
type _SpaceSpaceItem SpaceSpaceItem
// NewSpaceSpaceItem instantiates a new SpaceSpaceItem 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 NewSpaceSpaceItem() *SpaceSpaceItem {
this := SpaceSpaceItem{}
return &this
}
// NewSpaceSpaceItemWithDefaults instantiates a new SpaceSpaceItem 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 NewSpaceSpaceItemWithDefaults() *SpaceSpaceItem {
this := SpaceSpaceItem{}
return &this
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *SpaceSpaceItem) GetCreatedAt() int64 {
if o == nil || IsNil(o.CreatedAt) {
var ret int64
return ret
}
return *o.CreatedAt
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SpaceSpaceItem) GetCreatedAtOk() (*int64, bool) {
if o == nil || IsNil(o.CreatedAt) {
return nil, false
}
return o.CreatedAt, true
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *SpaceSpaceItem) HasCreatedAt() bool {
if o != nil && !IsNil(o.CreatedAt) {
return true
}
return false
}
// SetCreatedAt gets a reference to the given int64 and assigns it to the CreatedAt field.
func (o *SpaceSpaceItem) SetCreatedAt(v int64) {
o.CreatedAt = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *SpaceSpaceItem) 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 *SpaceSpaceItem) 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 *SpaceSpaceItem) 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 *SpaceSpaceItem) SetName(v string) {
o.Name = &v
}
func (o SpaceSpaceItem) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SpaceSpaceItem) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.CreatedAt) {
toSerialize["createdAt"] = o.CreatedAt
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *SpaceSpaceItem) UnmarshalJSON(data []byte) (err error) {
varSpaceSpaceItem := _SpaceSpaceItem{}
err = json.Unmarshal(data, &varSpaceSpaceItem)
if err != nil {
return err
}
*o = SpaceSpaceItem(varSpaceSpaceItem)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "createdAt")
delete(additionalProperties, "name")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableSpaceSpaceItem struct {
value *SpaceSpaceItem
isSet bool
}
func (v NullableSpaceSpaceItem) Get() *SpaceSpaceItem {
return v.value
}
func (v *NullableSpaceSpaceItem) Set(val *SpaceSpaceItem) {
v.value = val
v.isSet = true
}
func (v NullableSpaceSpaceItem) IsSet() bool {
return v.isSet
}
func (v *NullableSpaceSpaceItem) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSpaceSpaceItem(val *SpaceSpaceItem) *NullableSpaceSpaceItem {
return &NullableSpaceSpaceItem{value: val, isSet: true}
}
func (v NullableSpaceSpaceItem) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSpaceSpaceItem) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}