mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
155 lines
4.0 KiB
Go
155 lines
4.0 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 SpaceSpaceIn type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &SpaceSpaceIn{}
|
|
|
|
// SpaceSpaceIn struct for SpaceSpaceIn
|
|
type SpaceSpaceIn struct {
|
|
// Name is the space's name, matching ^[a-z0-9]([a-z0-9-]{0,38}[a-z0-9])?$ — the shape a drive name takes too, so a caller learns one rule. It is validated AS GIVEN and never lower-cased for you: a client that creates \"Photos\" and then lists \"photos\" would be reading a space it did not make, so mixed case is a clean 400.
|
|
Name *string `json:"name,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _SpaceSpaceIn SpaceSpaceIn
|
|
|
|
// NewSpaceSpaceIn instantiates a new SpaceSpaceIn 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 NewSpaceSpaceIn() *SpaceSpaceIn {
|
|
this := SpaceSpaceIn{}
|
|
return &this
|
|
}
|
|
|
|
// NewSpaceSpaceInWithDefaults instantiates a new SpaceSpaceIn 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 NewSpaceSpaceInWithDefaults() *SpaceSpaceIn {
|
|
this := SpaceSpaceIn{}
|
|
return &this
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *SpaceSpaceIn) 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 *SpaceSpaceIn) 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 *SpaceSpaceIn) 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 *SpaceSpaceIn) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
func (o SpaceSpaceIn) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o SpaceSpaceIn) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *SpaceSpaceIn) UnmarshalJSON(data []byte) (err error) {
|
|
varSpaceSpaceIn := _SpaceSpaceIn{}
|
|
|
|
err = json.Unmarshal(data, &varSpaceSpaceIn)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = SpaceSpaceIn(varSpaceSpaceIn)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "name")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableSpaceSpaceIn struct {
|
|
value *SpaceSpaceIn
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableSpaceSpaceIn) Get() *SpaceSpaceIn {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableSpaceSpaceIn) Set(val *SpaceSpaceIn) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableSpaceSpaceIn) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableSpaceSpaceIn) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableSpaceSpaceIn(val *SpaceSpaceIn) *NullableSpaceSpaceIn {
|
|
return &NullableSpaceSpaceIn{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableSpaceSpaceIn) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableSpaceSpaceIn) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|