mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
649 lines
19 KiB
Go
649 lines
19 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 GatewayTrafficView type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &GatewayTrafficView{}
|
|
|
|
// GatewayTrafficView struct for GatewayTrafficView
|
|
type GatewayTrafficView struct {
|
|
// Blind is how many requests in the window carried no identity to attribute them to — no validated credential and no client address. Non-zero on a public plane means the client address is not reaching this process (a TCP load balancer with no PROXY protocol in front of it, typically), so this scope's callers cannot be told apart and nothing can be held against them.
|
|
Blind *int64 `json:"blind,omitempty"`
|
|
// Callers is the scope's busiest callers this window. A credentialed caller appears as a FINGERPRINT — a per-process one-way digest: enough to recognise the same caller across requests, never enough to reconstruct the credential.
|
|
Callers []GatewayTrafficCaller `json:"callers,omitempty"`
|
|
// Ceiling is the most callers this scope may hold at once.
|
|
Ceiling *int64 `json:"ceiling,omitempty"`
|
|
// Denied is how many of them the gate refused.
|
|
Denied *int64 `json:"denied,omitempty"`
|
|
// Lanes is the request count per lane — agent, human, bot, unknown. This is the split that separates a customer's automation from a scraper.
|
|
Lanes map[string]int64 `json:"lanes,omitempty"`
|
|
// Mode is the abuse gate's posture for this scope: \"shadow\" records the scorer's action without enforcing it, \"live\" enforces it.
|
|
Mode *string `json:"mode,omitempty"`
|
|
// Org is the scope this view was taken for — the validated principal's own, never a value the caller supplied. Empty names the anonymous lane, the one scope that has no tenant.
|
|
Org *string `json:"org,omitempty"`
|
|
// Refused is how many callers this scope's ceilings turned away in the window.
|
|
Refused *int64 `json:"refused,omitempty"`
|
|
// Requests is how many requests this scope made in the window.
|
|
Requests *int64 `json:"requests,omitempty"`
|
|
// Screens is how many of them were put to the scorer — the billable unit of the risk product. Counted from the first request, whatever the SKU costs.
|
|
Screens *int64 `json:"screens,omitempty"`
|
|
// Strain is what this scope's ceilings are doing: \"clear\" below them, \"full\" at them, \"refuse\" once a caller has been turned away inside this window — which means that caller is UNMEASURED and the numbers here are a sample rather than a census. It is reported rather than logged because the alternative — a bound that degrades a scope silently — is the failure this design exists to rule out. No other scope can move it.
|
|
Strain *string `json:"strain,omitempty"`
|
|
// Tracked is how many callers this scope holds state for right now, and Ceiling is the most it may hold. Tracked == Ceiling is the fact a bound that binds cannot hide.
|
|
Tracked *int64 `json:"tracked,omitempty"`
|
|
// Unscored is how many of those screens got NO answer — the scorer was absent, stuck, slow, erroring or silent. An unanswered screen allows ordinary traffic, so this is the number that separates \"a quiet day\" from \"the judge stopped answering and nothing said so\".
|
|
Unscored *int64 `json:"unscored,omitempty"`
|
|
// WindowSec is the span the counts cover, in seconds.
|
|
WindowSec *int64 `json:"window_sec,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _GatewayTrafficView GatewayTrafficView
|
|
|
|
// NewGatewayTrafficView instantiates a new GatewayTrafficView 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 NewGatewayTrafficView() *GatewayTrafficView {
|
|
this := GatewayTrafficView{}
|
|
return &this
|
|
}
|
|
|
|
// NewGatewayTrafficViewWithDefaults instantiates a new GatewayTrafficView 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 NewGatewayTrafficViewWithDefaults() *GatewayTrafficView {
|
|
this := GatewayTrafficView{}
|
|
return &this
|
|
}
|
|
|
|
// GetBlind returns the Blind field value if set, zero value otherwise.
|
|
func (o *GatewayTrafficView) GetBlind() int64 {
|
|
if o == nil || IsNil(o.Blind) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Blind
|
|
}
|
|
|
|
// GetBlindOk returns a tuple with the Blind field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GatewayTrafficView) GetBlindOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Blind) {
|
|
return nil, false
|
|
}
|
|
return o.Blind, true
|
|
}
|
|
|
|
// HasBlind returns a boolean if a field has been set.
|
|
func (o *GatewayTrafficView) HasBlind() bool {
|
|
if o != nil && !IsNil(o.Blind) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBlind gets a reference to the given int64 and assigns it to the Blind field.
|
|
func (o *GatewayTrafficView) SetBlind(v int64) {
|
|
o.Blind = &v
|
|
}
|
|
|
|
// GetCallers returns the Callers field value if set, zero value otherwise.
|
|
func (o *GatewayTrafficView) GetCallers() []GatewayTrafficCaller {
|
|
if o == nil || IsNil(o.Callers) {
|
|
var ret []GatewayTrafficCaller
|
|
return ret
|
|
}
|
|
return o.Callers
|
|
}
|
|
|
|
// GetCallersOk returns a tuple with the Callers field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GatewayTrafficView) GetCallersOk() ([]GatewayTrafficCaller, bool) {
|
|
if o == nil || IsNil(o.Callers) {
|
|
return nil, false
|
|
}
|
|
return o.Callers, true
|
|
}
|
|
|
|
// HasCallers returns a boolean if a field has been set.
|
|
func (o *GatewayTrafficView) HasCallers() bool {
|
|
if o != nil && !IsNil(o.Callers) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCallers gets a reference to the given []GatewayTrafficCaller and assigns it to the Callers field.
|
|
func (o *GatewayTrafficView) SetCallers(v []GatewayTrafficCaller) {
|
|
o.Callers = v
|
|
}
|
|
|
|
// GetCeiling returns the Ceiling field value if set, zero value otherwise.
|
|
func (o *GatewayTrafficView) GetCeiling() int64 {
|
|
if o == nil || IsNil(o.Ceiling) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Ceiling
|
|
}
|
|
|
|
// GetCeilingOk returns a tuple with the Ceiling field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GatewayTrafficView) GetCeilingOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Ceiling) {
|
|
return nil, false
|
|
}
|
|
return o.Ceiling, true
|
|
}
|
|
|
|
// HasCeiling returns a boolean if a field has been set.
|
|
func (o *GatewayTrafficView) HasCeiling() bool {
|
|
if o != nil && !IsNil(o.Ceiling) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCeiling gets a reference to the given int64 and assigns it to the Ceiling field.
|
|
func (o *GatewayTrafficView) SetCeiling(v int64) {
|
|
o.Ceiling = &v
|
|
}
|
|
|
|
// GetDenied returns the Denied field value if set, zero value otherwise.
|
|
func (o *GatewayTrafficView) GetDenied() int64 {
|
|
if o == nil || IsNil(o.Denied) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Denied
|
|
}
|
|
|
|
// GetDeniedOk returns a tuple with the Denied field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GatewayTrafficView) GetDeniedOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Denied) {
|
|
return nil, false
|
|
}
|
|
return o.Denied, true
|
|
}
|
|
|
|
// HasDenied returns a boolean if a field has been set.
|
|
func (o *GatewayTrafficView) HasDenied() bool {
|
|
if o != nil && !IsNil(o.Denied) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDenied gets a reference to the given int64 and assigns it to the Denied field.
|
|
func (o *GatewayTrafficView) SetDenied(v int64) {
|
|
o.Denied = &v
|
|
}
|
|
|
|
// GetLanes returns the Lanes field value if set, zero value otherwise.
|
|
func (o *GatewayTrafficView) GetLanes() map[string]int64 {
|
|
if o == nil || IsNil(o.Lanes) {
|
|
var ret map[string]int64
|
|
return ret
|
|
}
|
|
return o.Lanes
|
|
}
|
|
|
|
// GetLanesOk returns a tuple with the Lanes field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GatewayTrafficView) GetLanesOk() (map[string]int64, bool) {
|
|
if o == nil || IsNil(o.Lanes) {
|
|
return map[string]int64{}, false
|
|
}
|
|
return o.Lanes, true
|
|
}
|
|
|
|
// HasLanes returns a boolean if a field has been set.
|
|
func (o *GatewayTrafficView) HasLanes() bool {
|
|
if o != nil && !IsNil(o.Lanes) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLanes gets a reference to the given map[string]int64 and assigns it to the Lanes field.
|
|
func (o *GatewayTrafficView) SetLanes(v map[string]int64) {
|
|
o.Lanes = v
|
|
}
|
|
|
|
// GetMode returns the Mode field value if set, zero value otherwise.
|
|
func (o *GatewayTrafficView) GetMode() string {
|
|
if o == nil || IsNil(o.Mode) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Mode
|
|
}
|
|
|
|
// GetModeOk returns a tuple with the Mode field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GatewayTrafficView) GetModeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Mode) {
|
|
return nil, false
|
|
}
|
|
return o.Mode, true
|
|
}
|
|
|
|
// HasMode returns a boolean if a field has been set.
|
|
func (o *GatewayTrafficView) HasMode() bool {
|
|
if o != nil && !IsNil(o.Mode) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMode gets a reference to the given string and assigns it to the Mode field.
|
|
func (o *GatewayTrafficView) SetMode(v string) {
|
|
o.Mode = &v
|
|
}
|
|
|
|
// GetOrg returns the Org field value if set, zero value otherwise.
|
|
func (o *GatewayTrafficView) GetOrg() string {
|
|
if o == nil || IsNil(o.Org) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Org
|
|
}
|
|
|
|
// GetOrgOk returns a tuple with the Org field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GatewayTrafficView) GetOrgOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Org) {
|
|
return nil, false
|
|
}
|
|
return o.Org, true
|
|
}
|
|
|
|
// HasOrg returns a boolean if a field has been set.
|
|
func (o *GatewayTrafficView) HasOrg() bool {
|
|
if o != nil && !IsNil(o.Org) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOrg gets a reference to the given string and assigns it to the Org field.
|
|
func (o *GatewayTrafficView) SetOrg(v string) {
|
|
o.Org = &v
|
|
}
|
|
|
|
// GetRefused returns the Refused field value if set, zero value otherwise.
|
|
func (o *GatewayTrafficView) GetRefused() int64 {
|
|
if o == nil || IsNil(o.Refused) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Refused
|
|
}
|
|
|
|
// GetRefusedOk returns a tuple with the Refused field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GatewayTrafficView) GetRefusedOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Refused) {
|
|
return nil, false
|
|
}
|
|
return o.Refused, true
|
|
}
|
|
|
|
// HasRefused returns a boolean if a field has been set.
|
|
func (o *GatewayTrafficView) HasRefused() bool {
|
|
if o != nil && !IsNil(o.Refused) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRefused gets a reference to the given int64 and assigns it to the Refused field.
|
|
func (o *GatewayTrafficView) SetRefused(v int64) {
|
|
o.Refused = &v
|
|
}
|
|
|
|
// GetRequests returns the Requests field value if set, zero value otherwise.
|
|
func (o *GatewayTrafficView) GetRequests() int64 {
|
|
if o == nil || IsNil(o.Requests) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Requests
|
|
}
|
|
|
|
// GetRequestsOk returns a tuple with the Requests field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GatewayTrafficView) GetRequestsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Requests) {
|
|
return nil, false
|
|
}
|
|
return o.Requests, true
|
|
}
|
|
|
|
// HasRequests returns a boolean if a field has been set.
|
|
func (o *GatewayTrafficView) HasRequests() bool {
|
|
if o != nil && !IsNil(o.Requests) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRequests gets a reference to the given int64 and assigns it to the Requests field.
|
|
func (o *GatewayTrafficView) SetRequests(v int64) {
|
|
o.Requests = &v
|
|
}
|
|
|
|
// GetScreens returns the Screens field value if set, zero value otherwise.
|
|
func (o *GatewayTrafficView) GetScreens() int64 {
|
|
if o == nil || IsNil(o.Screens) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Screens
|
|
}
|
|
|
|
// GetScreensOk returns a tuple with the Screens field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GatewayTrafficView) GetScreensOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Screens) {
|
|
return nil, false
|
|
}
|
|
return o.Screens, true
|
|
}
|
|
|
|
// HasScreens returns a boolean if a field has been set.
|
|
func (o *GatewayTrafficView) HasScreens() bool {
|
|
if o != nil && !IsNil(o.Screens) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetScreens gets a reference to the given int64 and assigns it to the Screens field.
|
|
func (o *GatewayTrafficView) SetScreens(v int64) {
|
|
o.Screens = &v
|
|
}
|
|
|
|
// GetStrain returns the Strain field value if set, zero value otherwise.
|
|
func (o *GatewayTrafficView) GetStrain() string {
|
|
if o == nil || IsNil(o.Strain) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Strain
|
|
}
|
|
|
|
// GetStrainOk returns a tuple with the Strain field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GatewayTrafficView) GetStrainOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Strain) {
|
|
return nil, false
|
|
}
|
|
return o.Strain, true
|
|
}
|
|
|
|
// HasStrain returns a boolean if a field has been set.
|
|
func (o *GatewayTrafficView) HasStrain() bool {
|
|
if o != nil && !IsNil(o.Strain) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStrain gets a reference to the given string and assigns it to the Strain field.
|
|
func (o *GatewayTrafficView) SetStrain(v string) {
|
|
o.Strain = &v
|
|
}
|
|
|
|
// GetTracked returns the Tracked field value if set, zero value otherwise.
|
|
func (o *GatewayTrafficView) GetTracked() int64 {
|
|
if o == nil || IsNil(o.Tracked) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Tracked
|
|
}
|
|
|
|
// GetTrackedOk returns a tuple with the Tracked field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GatewayTrafficView) GetTrackedOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Tracked) {
|
|
return nil, false
|
|
}
|
|
return o.Tracked, true
|
|
}
|
|
|
|
// HasTracked returns a boolean if a field has been set.
|
|
func (o *GatewayTrafficView) HasTracked() bool {
|
|
if o != nil && !IsNil(o.Tracked) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTracked gets a reference to the given int64 and assigns it to the Tracked field.
|
|
func (o *GatewayTrafficView) SetTracked(v int64) {
|
|
o.Tracked = &v
|
|
}
|
|
|
|
// GetUnscored returns the Unscored field value if set, zero value otherwise.
|
|
func (o *GatewayTrafficView) GetUnscored() int64 {
|
|
if o == nil || IsNil(o.Unscored) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Unscored
|
|
}
|
|
|
|
// GetUnscoredOk returns a tuple with the Unscored field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GatewayTrafficView) GetUnscoredOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Unscored) {
|
|
return nil, false
|
|
}
|
|
return o.Unscored, true
|
|
}
|
|
|
|
// HasUnscored returns a boolean if a field has been set.
|
|
func (o *GatewayTrafficView) HasUnscored() bool {
|
|
if o != nil && !IsNil(o.Unscored) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUnscored gets a reference to the given int64 and assigns it to the Unscored field.
|
|
func (o *GatewayTrafficView) SetUnscored(v int64) {
|
|
o.Unscored = &v
|
|
}
|
|
|
|
// GetWindowSec returns the WindowSec field value if set, zero value otherwise.
|
|
func (o *GatewayTrafficView) GetWindowSec() int64 {
|
|
if o == nil || IsNil(o.WindowSec) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.WindowSec
|
|
}
|
|
|
|
// GetWindowSecOk returns a tuple with the WindowSec field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GatewayTrafficView) GetWindowSecOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.WindowSec) {
|
|
return nil, false
|
|
}
|
|
return o.WindowSec, true
|
|
}
|
|
|
|
// HasWindowSec returns a boolean if a field has been set.
|
|
func (o *GatewayTrafficView) HasWindowSec() bool {
|
|
if o != nil && !IsNil(o.WindowSec) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetWindowSec gets a reference to the given int64 and assigns it to the WindowSec field.
|
|
func (o *GatewayTrafficView) SetWindowSec(v int64) {
|
|
o.WindowSec = &v
|
|
}
|
|
|
|
func (o GatewayTrafficView) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o GatewayTrafficView) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Blind) {
|
|
toSerialize["blind"] = o.Blind
|
|
}
|
|
if !IsNil(o.Callers) {
|
|
toSerialize["callers"] = o.Callers
|
|
}
|
|
if !IsNil(o.Ceiling) {
|
|
toSerialize["ceiling"] = o.Ceiling
|
|
}
|
|
if !IsNil(o.Denied) {
|
|
toSerialize["denied"] = o.Denied
|
|
}
|
|
if !IsNil(o.Lanes) {
|
|
toSerialize["lanes"] = o.Lanes
|
|
}
|
|
if !IsNil(o.Mode) {
|
|
toSerialize["mode"] = o.Mode
|
|
}
|
|
if !IsNil(o.Org) {
|
|
toSerialize["org"] = o.Org
|
|
}
|
|
if !IsNil(o.Refused) {
|
|
toSerialize["refused"] = o.Refused
|
|
}
|
|
if !IsNil(o.Requests) {
|
|
toSerialize["requests"] = o.Requests
|
|
}
|
|
if !IsNil(o.Screens) {
|
|
toSerialize["screens"] = o.Screens
|
|
}
|
|
if !IsNil(o.Strain) {
|
|
toSerialize["strain"] = o.Strain
|
|
}
|
|
if !IsNil(o.Tracked) {
|
|
toSerialize["tracked"] = o.Tracked
|
|
}
|
|
if !IsNil(o.Unscored) {
|
|
toSerialize["unscored"] = o.Unscored
|
|
}
|
|
if !IsNil(o.WindowSec) {
|
|
toSerialize["window_sec"] = o.WindowSec
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *GatewayTrafficView) UnmarshalJSON(data []byte) (err error) {
|
|
varGatewayTrafficView := _GatewayTrafficView{}
|
|
|
|
err = json.Unmarshal(data, &varGatewayTrafficView)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = GatewayTrafficView(varGatewayTrafficView)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "blind")
|
|
delete(additionalProperties, "callers")
|
|
delete(additionalProperties, "ceiling")
|
|
delete(additionalProperties, "denied")
|
|
delete(additionalProperties, "lanes")
|
|
delete(additionalProperties, "mode")
|
|
delete(additionalProperties, "org")
|
|
delete(additionalProperties, "refused")
|
|
delete(additionalProperties, "requests")
|
|
delete(additionalProperties, "screens")
|
|
delete(additionalProperties, "strain")
|
|
delete(additionalProperties, "tracked")
|
|
delete(additionalProperties, "unscored")
|
|
delete(additionalProperties, "window_sec")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableGatewayTrafficView struct {
|
|
value *GatewayTrafficView
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGatewayTrafficView) Get() *GatewayTrafficView {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGatewayTrafficView) Set(val *GatewayTrafficView) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGatewayTrafficView) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGatewayTrafficView) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGatewayTrafficView(val *GatewayTrafficView) *NullableGatewayTrafficView {
|
|
return &NullableGatewayTrafficView{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGatewayTrafficView) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGatewayTrafficView) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|