mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
231 lines
6.1 KiB
Go
231 lines
6.1 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 TeamStatsOut type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &TeamStatsOut{}
|
|
|
|
// TeamStatsOut struct for TeamStatsOut
|
|
type TeamStatsOut struct {
|
|
// Admin is the upstream service's server-panel flag, always false here.
|
|
Admin *bool `json:"admin,omitempty"`
|
|
// Metrics is the upstream transactor's metrics block. This server does not populate it, so it is always the empty object — the front reads the key, not its contents.
|
|
Metrics map[string]interface{} `json:"metrics,omitempty"`
|
|
// Statistics carries the live sessions.
|
|
Statistics *TeamStatsSessions `json:"statistics,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _TeamStatsOut TeamStatsOut
|
|
|
|
// NewTeamStatsOut instantiates a new TeamStatsOut 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 NewTeamStatsOut() *TeamStatsOut {
|
|
this := TeamStatsOut{}
|
|
return &this
|
|
}
|
|
|
|
// NewTeamStatsOutWithDefaults instantiates a new TeamStatsOut 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 NewTeamStatsOutWithDefaults() *TeamStatsOut {
|
|
this := TeamStatsOut{}
|
|
return &this
|
|
}
|
|
|
|
// GetAdmin returns the Admin field value if set, zero value otherwise.
|
|
func (o *TeamStatsOut) GetAdmin() bool {
|
|
if o == nil || IsNil(o.Admin) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Admin
|
|
}
|
|
|
|
// GetAdminOk returns a tuple with the Admin field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TeamStatsOut) GetAdminOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Admin) {
|
|
return nil, false
|
|
}
|
|
return o.Admin, true
|
|
}
|
|
|
|
// HasAdmin returns a boolean if a field has been set.
|
|
func (o *TeamStatsOut) HasAdmin() bool {
|
|
if o != nil && !IsNil(o.Admin) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAdmin gets a reference to the given bool and assigns it to the Admin field.
|
|
func (o *TeamStatsOut) SetAdmin(v bool) {
|
|
o.Admin = &v
|
|
}
|
|
|
|
// GetMetrics returns the Metrics field value if set, zero value otherwise.
|
|
func (o *TeamStatsOut) GetMetrics() map[string]interface{} {
|
|
if o == nil || IsNil(o.Metrics) {
|
|
var ret map[string]interface{}
|
|
return ret
|
|
}
|
|
return o.Metrics
|
|
}
|
|
|
|
// GetMetricsOk returns a tuple with the Metrics field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TeamStatsOut) GetMetricsOk() (map[string]interface{}, bool) {
|
|
if o == nil || IsNil(o.Metrics) {
|
|
return map[string]interface{}{}, false
|
|
}
|
|
return o.Metrics, true
|
|
}
|
|
|
|
// HasMetrics returns a boolean if a field has been set.
|
|
func (o *TeamStatsOut) HasMetrics() bool {
|
|
if o != nil && !IsNil(o.Metrics) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMetrics gets a reference to the given map[string]interface{} and assigns it to the Metrics field.
|
|
func (o *TeamStatsOut) SetMetrics(v map[string]interface{}) {
|
|
o.Metrics = v
|
|
}
|
|
|
|
// GetStatistics returns the Statistics field value if set, zero value otherwise.
|
|
func (o *TeamStatsOut) GetStatistics() TeamStatsSessions {
|
|
if o == nil || IsNil(o.Statistics) {
|
|
var ret TeamStatsSessions
|
|
return ret
|
|
}
|
|
return *o.Statistics
|
|
}
|
|
|
|
// GetStatisticsOk returns a tuple with the Statistics field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TeamStatsOut) GetStatisticsOk() (*TeamStatsSessions, bool) {
|
|
if o == nil || IsNil(o.Statistics) {
|
|
return nil, false
|
|
}
|
|
return o.Statistics, true
|
|
}
|
|
|
|
// HasStatistics returns a boolean if a field has been set.
|
|
func (o *TeamStatsOut) HasStatistics() bool {
|
|
if o != nil && !IsNil(o.Statistics) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStatistics gets a reference to the given TeamStatsSessions and assigns it to the Statistics field.
|
|
func (o *TeamStatsOut) SetStatistics(v TeamStatsSessions) {
|
|
o.Statistics = &v
|
|
}
|
|
|
|
func (o TeamStatsOut) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o TeamStatsOut) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Admin) {
|
|
toSerialize["admin"] = o.Admin
|
|
}
|
|
if !IsNil(o.Metrics) {
|
|
toSerialize["metrics"] = o.Metrics
|
|
}
|
|
if !IsNil(o.Statistics) {
|
|
toSerialize["statistics"] = o.Statistics
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *TeamStatsOut) UnmarshalJSON(data []byte) (err error) {
|
|
varTeamStatsOut := _TeamStatsOut{}
|
|
|
|
err = json.Unmarshal(data, &varTeamStatsOut)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = TeamStatsOut(varTeamStatsOut)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "admin")
|
|
delete(additionalProperties, "metrics")
|
|
delete(additionalProperties, "statistics")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableTeamStatsOut struct {
|
|
value *TeamStatsOut
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTeamStatsOut) Get() *TeamStatsOut {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTeamStatsOut) Set(val *TeamStatsOut) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTeamStatsOut) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTeamStatsOut) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTeamStatsOut(val *TeamStatsOut) *NullableTeamStatsOut {
|
|
return &NullableTeamStatsOut{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTeamStatsOut) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTeamStatsOut) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|