Files
sdk/model_studio_step_price.go

228 lines
5.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 StudioStepPrice type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &StudioStepPrice{}
// StudioStepPrice struct for StudioStepPrice
type StudioStepPrice struct {
Cents *int64 `json:"cents,omitempty"`
Id *string `json:"id,omitempty"`
Op *string `json:"op,omitempty"`
AdditionalProperties map[string]interface{}
}
type _StudioStepPrice StudioStepPrice
// NewStudioStepPrice instantiates a new StudioStepPrice 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 NewStudioStepPrice() *StudioStepPrice {
this := StudioStepPrice{}
return &this
}
// NewStudioStepPriceWithDefaults instantiates a new StudioStepPrice 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 NewStudioStepPriceWithDefaults() *StudioStepPrice {
this := StudioStepPrice{}
return &this
}
// GetCents returns the Cents field value if set, zero value otherwise.
func (o *StudioStepPrice) 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 *StudioStepPrice) 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 *StudioStepPrice) 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 *StudioStepPrice) SetCents(v int64) {
o.Cents = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *StudioStepPrice) GetId() string {
if o == nil || IsNil(o.Id) {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StudioStepPrice) GetIdOk() (*string, bool) {
if o == nil || IsNil(o.Id) {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *StudioStepPrice) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *StudioStepPrice) SetId(v string) {
o.Id = &v
}
// GetOp returns the Op field value if set, zero value otherwise.
func (o *StudioStepPrice) GetOp() string {
if o == nil || IsNil(o.Op) {
var ret string
return ret
}
return *o.Op
}
// GetOpOk returns a tuple with the Op field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StudioStepPrice) GetOpOk() (*string, bool) {
if o == nil || IsNil(o.Op) {
return nil, false
}
return o.Op, true
}
// HasOp returns a boolean if a field has been set.
func (o *StudioStepPrice) HasOp() bool {
if o != nil && !IsNil(o.Op) {
return true
}
return false
}
// SetOp gets a reference to the given string and assigns it to the Op field.
func (o *StudioStepPrice) SetOp(v string) {
o.Op = &v
}
func (o StudioStepPrice) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o StudioStepPrice) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Cents) {
toSerialize["cents"] = o.Cents
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Op) {
toSerialize["op"] = o.Op
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *StudioStepPrice) UnmarshalJSON(data []byte) (err error) {
varStudioStepPrice := _StudioStepPrice{}
err = json.Unmarshal(data, &varStudioStepPrice)
if err != nil {
return err
}
*o = StudioStepPrice(varStudioStepPrice)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "cents")
delete(additionalProperties, "id")
delete(additionalProperties, "op")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableStudioStepPrice struct {
value *StudioStepPrice
isSet bool
}
func (v NullableStudioStepPrice) Get() *StudioStepPrice {
return v.value
}
func (v *NullableStudioStepPrice) Set(val *StudioStepPrice) {
v.value = val
v.isSet = true
}
func (v NullableStudioStepPrice) IsSet() bool {
return v.isSet
}
func (v *NullableStudioStepPrice) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableStudioStepPrice(val *StudioStepPrice) *NullableStudioStepPrice {
return &NullableStudioStepPrice{value: val, isSet: true}
}
func (v NullableStudioStepPrice) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableStudioStepPrice) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}