mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
191 lines
4.8 KiB
Go
191 lines
4.8 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 StudioEstimate type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &StudioEstimate{}
|
|
|
|
// StudioEstimate struct for StudioEstimate
|
|
type StudioEstimate struct {
|
|
Cents *int64 `json:"cents,omitempty"`
|
|
Steps []StudioStepPrice `json:"steps,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _StudioEstimate StudioEstimate
|
|
|
|
// NewStudioEstimate instantiates a new StudioEstimate 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 NewStudioEstimate() *StudioEstimate {
|
|
this := StudioEstimate{}
|
|
return &this
|
|
}
|
|
|
|
// NewStudioEstimateWithDefaults instantiates a new StudioEstimate 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 NewStudioEstimateWithDefaults() *StudioEstimate {
|
|
this := StudioEstimate{}
|
|
return &this
|
|
}
|
|
|
|
// GetCents returns the Cents field value if set, zero value otherwise.
|
|
func (o *StudioEstimate) GetCents() int64 {
|
|
if o == nil || IsNil(o.Cents) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Cents
|
|
}
|
|
|
|
// GetCentsOk returns a tuple with the Cents field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioEstimate) GetCentsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Cents) {
|
|
return nil, false
|
|
}
|
|
return o.Cents, true
|
|
}
|
|
|
|
// HasCents returns a boolean if a field has been set.
|
|
func (o *StudioEstimate) HasCents() bool {
|
|
if o != nil && !IsNil(o.Cents) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCents gets a reference to the given int64 and assigns it to the Cents field.
|
|
func (o *StudioEstimate) SetCents(v int64) {
|
|
o.Cents = &v
|
|
}
|
|
|
|
// GetSteps returns the Steps field value if set, zero value otherwise.
|
|
func (o *StudioEstimate) GetSteps() []StudioStepPrice {
|
|
if o == nil || IsNil(o.Steps) {
|
|
var ret []StudioStepPrice
|
|
return ret
|
|
}
|
|
return o.Steps
|
|
}
|
|
|
|
// GetStepsOk returns a tuple with the Steps field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *StudioEstimate) GetStepsOk() ([]StudioStepPrice, bool) {
|
|
if o == nil || IsNil(o.Steps) {
|
|
return nil, false
|
|
}
|
|
return o.Steps, true
|
|
}
|
|
|
|
// HasSteps returns a boolean if a field has been set.
|
|
func (o *StudioEstimate) HasSteps() bool {
|
|
if o != nil && !IsNil(o.Steps) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSteps gets a reference to the given []StudioStepPrice and assigns it to the Steps field.
|
|
func (o *StudioEstimate) SetSteps(v []StudioStepPrice) {
|
|
o.Steps = v
|
|
}
|
|
|
|
func (o StudioEstimate) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o StudioEstimate) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Cents) {
|
|
toSerialize["cents"] = o.Cents
|
|
}
|
|
if !IsNil(o.Steps) {
|
|
toSerialize["steps"] = o.Steps
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *StudioEstimate) UnmarshalJSON(data []byte) (err error) {
|
|
varStudioEstimate := _StudioEstimate{}
|
|
|
|
err = json.Unmarshal(data, &varStudioEstimate)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = StudioEstimate(varStudioEstimate)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "cents")
|
|
delete(additionalProperties, "steps")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableStudioEstimate struct {
|
|
value *StudioEstimate
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableStudioEstimate) Get() *StudioEstimate {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableStudioEstimate) Set(val *StudioEstimate) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableStudioEstimate) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableStudioEstimate) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableStudioEstimate(val *StudioEstimate) *NullableStudioEstimate {
|
|
return &NullableStudioEstimate{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableStudioEstimate) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableStudioEstimate) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|