mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
231 lines
5.7 KiB
Go
231 lines
5.7 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 TelSummary type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &TelSummary{}
|
|
|
|
// TelSummary struct for TelSummary
|
|
type TelSummary struct {
|
|
// Calls is how many calls this org has placed or received, over its whole history — a running total, not a window.
|
|
Calls *int64 `json:"calls,omitempty"`
|
|
// Messages is the same running total for messages.
|
|
Messages *int64 `json:"messages,omitempty"`
|
|
// Numbers is how many numbers this org holds right now.
|
|
Numbers *int64 `json:"numbers,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _TelSummary TelSummary
|
|
|
|
// NewTelSummary instantiates a new TelSummary 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 NewTelSummary() *TelSummary {
|
|
this := TelSummary{}
|
|
return &this
|
|
}
|
|
|
|
// NewTelSummaryWithDefaults instantiates a new TelSummary 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 NewTelSummaryWithDefaults() *TelSummary {
|
|
this := TelSummary{}
|
|
return &this
|
|
}
|
|
|
|
// GetCalls returns the Calls field value if set, zero value otherwise.
|
|
func (o *TelSummary) GetCalls() int64 {
|
|
if o == nil || IsNil(o.Calls) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Calls
|
|
}
|
|
|
|
// GetCallsOk returns a tuple with the Calls field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TelSummary) GetCallsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Calls) {
|
|
return nil, false
|
|
}
|
|
return o.Calls, true
|
|
}
|
|
|
|
// HasCalls returns a boolean if a field has been set.
|
|
func (o *TelSummary) HasCalls() bool {
|
|
if o != nil && !IsNil(o.Calls) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCalls gets a reference to the given int64 and assigns it to the Calls field.
|
|
func (o *TelSummary) SetCalls(v int64) {
|
|
o.Calls = &v
|
|
}
|
|
|
|
// GetMessages returns the Messages field value if set, zero value otherwise.
|
|
func (o *TelSummary) GetMessages() int64 {
|
|
if o == nil || IsNil(o.Messages) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Messages
|
|
}
|
|
|
|
// GetMessagesOk returns a tuple with the Messages field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TelSummary) GetMessagesOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Messages) {
|
|
return nil, false
|
|
}
|
|
return o.Messages, true
|
|
}
|
|
|
|
// HasMessages returns a boolean if a field has been set.
|
|
func (o *TelSummary) HasMessages() bool {
|
|
if o != nil && !IsNil(o.Messages) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMessages gets a reference to the given int64 and assigns it to the Messages field.
|
|
func (o *TelSummary) SetMessages(v int64) {
|
|
o.Messages = &v
|
|
}
|
|
|
|
// GetNumbers returns the Numbers field value if set, zero value otherwise.
|
|
func (o *TelSummary) GetNumbers() int64 {
|
|
if o == nil || IsNil(o.Numbers) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Numbers
|
|
}
|
|
|
|
// GetNumbersOk returns a tuple with the Numbers field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TelSummary) GetNumbersOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Numbers) {
|
|
return nil, false
|
|
}
|
|
return o.Numbers, true
|
|
}
|
|
|
|
// HasNumbers returns a boolean if a field has been set.
|
|
func (o *TelSummary) HasNumbers() bool {
|
|
if o != nil && !IsNil(o.Numbers) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNumbers gets a reference to the given int64 and assigns it to the Numbers field.
|
|
func (o *TelSummary) SetNumbers(v int64) {
|
|
o.Numbers = &v
|
|
}
|
|
|
|
func (o TelSummary) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o TelSummary) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Calls) {
|
|
toSerialize["calls"] = o.Calls
|
|
}
|
|
if !IsNil(o.Messages) {
|
|
toSerialize["messages"] = o.Messages
|
|
}
|
|
if !IsNil(o.Numbers) {
|
|
toSerialize["numbers"] = o.Numbers
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *TelSummary) UnmarshalJSON(data []byte) (err error) {
|
|
varTelSummary := _TelSummary{}
|
|
|
|
err = json.Unmarshal(data, &varTelSummary)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = TelSummary(varTelSummary)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "calls")
|
|
delete(additionalProperties, "messages")
|
|
delete(additionalProperties, "numbers")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableTelSummary struct {
|
|
value *TelSummary
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTelSummary) Get() *TelSummary {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTelSummary) Set(val *TelSummary) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTelSummary) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTelSummary) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTelSummary(val *TelSummary) *NullableTelSummary {
|
|
return &NullableTelSummary{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTelSummary) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTelSummary) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|