mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
5.0 KiB
Go
193 lines
5.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 BillingResize type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &BillingResize{}
|
|
|
|
// BillingResize struct for BillingResize
|
|
type BillingResize struct {
|
|
// Lines are the team's other seat types and the seats of each: [{\"planId\":\"team-premium\",\"quantity\":2}]. A seat type of the team the subscription does not hold yet is added.
|
|
Lines []BillingSaleLine `json:"lines,omitempty"`
|
|
// Quantity is the seats of the subscription's own seat type; 0 keeps them.
|
|
Quantity *int64 `json:"quantity,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _BillingResize BillingResize
|
|
|
|
// NewBillingResize instantiates a new BillingResize 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 NewBillingResize() *BillingResize {
|
|
this := BillingResize{}
|
|
return &this
|
|
}
|
|
|
|
// NewBillingResizeWithDefaults instantiates a new BillingResize 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 NewBillingResizeWithDefaults() *BillingResize {
|
|
this := BillingResize{}
|
|
return &this
|
|
}
|
|
|
|
// GetLines returns the Lines field value if set, zero value otherwise.
|
|
func (o *BillingResize) GetLines() []BillingSaleLine {
|
|
if o == nil || IsNil(o.Lines) {
|
|
var ret []BillingSaleLine
|
|
return ret
|
|
}
|
|
return o.Lines
|
|
}
|
|
|
|
// GetLinesOk returns a tuple with the Lines field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingResize) GetLinesOk() ([]BillingSaleLine, bool) {
|
|
if o == nil || IsNil(o.Lines) {
|
|
return nil, false
|
|
}
|
|
return o.Lines, true
|
|
}
|
|
|
|
// HasLines returns a boolean if a field has been set.
|
|
func (o *BillingResize) HasLines() bool {
|
|
if o != nil && !IsNil(o.Lines) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLines gets a reference to the given []BillingSaleLine and assigns it to the Lines field.
|
|
func (o *BillingResize) SetLines(v []BillingSaleLine) {
|
|
o.Lines = v
|
|
}
|
|
|
|
// GetQuantity returns the Quantity field value if set, zero value otherwise.
|
|
func (o *BillingResize) GetQuantity() int64 {
|
|
if o == nil || IsNil(o.Quantity) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Quantity
|
|
}
|
|
|
|
// GetQuantityOk returns a tuple with the Quantity field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingResize) GetQuantityOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Quantity) {
|
|
return nil, false
|
|
}
|
|
return o.Quantity, true
|
|
}
|
|
|
|
// HasQuantity returns a boolean if a field has been set.
|
|
func (o *BillingResize) HasQuantity() bool {
|
|
if o != nil && !IsNil(o.Quantity) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetQuantity gets a reference to the given int64 and assigns it to the Quantity field.
|
|
func (o *BillingResize) SetQuantity(v int64) {
|
|
o.Quantity = &v
|
|
}
|
|
|
|
func (o BillingResize) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o BillingResize) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Lines) {
|
|
toSerialize["lines"] = o.Lines
|
|
}
|
|
if !IsNil(o.Quantity) {
|
|
toSerialize["quantity"] = o.Quantity
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *BillingResize) UnmarshalJSON(data []byte) (err error) {
|
|
varBillingResize := _BillingResize{}
|
|
|
|
err = json.Unmarshal(data, &varBillingResize)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = BillingResize(varBillingResize)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "lines")
|
|
delete(additionalProperties, "quantity")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableBillingResize struct {
|
|
value *BillingResize
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableBillingResize) Get() *BillingResize {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableBillingResize) Set(val *BillingResize) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableBillingResize) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableBillingResize) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableBillingResize(val *BillingResize) *NullableBillingResize {
|
|
return &NullableBillingResize{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableBillingResize) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableBillingResize) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|