mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
155 lines
4.3 KiB
Go
155 lines
4.3 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 AffiliateClickCount type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AffiliateClickCount{}
|
|
|
|
// AffiliateClickCount struct for AffiliateClickCount
|
|
type AffiliateClickCount struct {
|
|
// Counted says the in-memory buffer took the ping. It does NOT say the code exists — this is deliberately not a code-existence oracle, and an unknown code simply no-ops at flush time. false means the buffer was full and the ping was dropped, which is harmless: clicks are vanity and move no money.
|
|
Counted *bool `json:"counted,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AffiliateClickCount AffiliateClickCount
|
|
|
|
// NewAffiliateClickCount instantiates a new AffiliateClickCount 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 NewAffiliateClickCount() *AffiliateClickCount {
|
|
this := AffiliateClickCount{}
|
|
return &this
|
|
}
|
|
|
|
// NewAffiliateClickCountWithDefaults instantiates a new AffiliateClickCount 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 NewAffiliateClickCountWithDefaults() *AffiliateClickCount {
|
|
this := AffiliateClickCount{}
|
|
return &this
|
|
}
|
|
|
|
// GetCounted returns the Counted field value if set, zero value otherwise.
|
|
func (o *AffiliateClickCount) GetCounted() bool {
|
|
if o == nil || IsNil(o.Counted) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Counted
|
|
}
|
|
|
|
// GetCountedOk returns a tuple with the Counted field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AffiliateClickCount) GetCountedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Counted) {
|
|
return nil, false
|
|
}
|
|
return o.Counted, true
|
|
}
|
|
|
|
// HasCounted returns a boolean if a field has been set.
|
|
func (o *AffiliateClickCount) HasCounted() bool {
|
|
if o != nil && !IsNil(o.Counted) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCounted gets a reference to the given bool and assigns it to the Counted field.
|
|
func (o *AffiliateClickCount) SetCounted(v bool) {
|
|
o.Counted = &v
|
|
}
|
|
|
|
func (o AffiliateClickCount) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AffiliateClickCount) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Counted) {
|
|
toSerialize["counted"] = o.Counted
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AffiliateClickCount) UnmarshalJSON(data []byte) (err error) {
|
|
varAffiliateClickCount := _AffiliateClickCount{}
|
|
|
|
err = json.Unmarshal(data, &varAffiliateClickCount)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AffiliateClickCount(varAffiliateClickCount)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "counted")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAffiliateClickCount struct {
|
|
value *AffiliateClickCount
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAffiliateClickCount) Get() *AffiliateClickCount {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAffiliateClickCount) Set(val *AffiliateClickCount) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAffiliateClickCount) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAffiliateClickCount) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAffiliateClickCount(val *AffiliateClickCount) *NullableAffiliateClickCount {
|
|
return &NullableAffiliateClickCount{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAffiliateClickCount) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAffiliateClickCount) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|