mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
155 lines
4.1 KiB
Go
155 lines
4.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 AffiliateLinkMint type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AffiliateLinkMint{}
|
|
|
|
// AffiliateLinkMint struct for AffiliateLinkMint
|
|
type AffiliateLinkMint struct {
|
|
// Link is the link just minted, with its full shareable URL. Its funnel counters all start at zero — nothing has clicked or signed up through it yet.
|
|
Link *AffiliateCodeView `json:"link,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AffiliateLinkMint AffiliateLinkMint
|
|
|
|
// NewAffiliateLinkMint instantiates a new AffiliateLinkMint 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 NewAffiliateLinkMint() *AffiliateLinkMint {
|
|
this := AffiliateLinkMint{}
|
|
return &this
|
|
}
|
|
|
|
// NewAffiliateLinkMintWithDefaults instantiates a new AffiliateLinkMint 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 NewAffiliateLinkMintWithDefaults() *AffiliateLinkMint {
|
|
this := AffiliateLinkMint{}
|
|
return &this
|
|
}
|
|
|
|
// GetLink returns the Link field value if set, zero value otherwise.
|
|
func (o *AffiliateLinkMint) GetLink() AffiliateCodeView {
|
|
if o == nil || IsNil(o.Link) {
|
|
var ret AffiliateCodeView
|
|
return ret
|
|
}
|
|
return *o.Link
|
|
}
|
|
|
|
// GetLinkOk returns a tuple with the Link field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AffiliateLinkMint) GetLinkOk() (*AffiliateCodeView, bool) {
|
|
if o == nil || IsNil(o.Link) {
|
|
return nil, false
|
|
}
|
|
return o.Link, true
|
|
}
|
|
|
|
// HasLink returns a boolean if a field has been set.
|
|
func (o *AffiliateLinkMint) HasLink() bool {
|
|
if o != nil && !IsNil(o.Link) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLink gets a reference to the given AffiliateCodeView and assigns it to the Link field.
|
|
func (o *AffiliateLinkMint) SetLink(v AffiliateCodeView) {
|
|
o.Link = &v
|
|
}
|
|
|
|
func (o AffiliateLinkMint) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AffiliateLinkMint) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Link) {
|
|
toSerialize["link"] = o.Link
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AffiliateLinkMint) UnmarshalJSON(data []byte) (err error) {
|
|
varAffiliateLinkMint := _AffiliateLinkMint{}
|
|
|
|
err = json.Unmarshal(data, &varAffiliateLinkMint)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AffiliateLinkMint(varAffiliateLinkMint)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "link")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAffiliateLinkMint struct {
|
|
value *AffiliateLinkMint
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAffiliateLinkMint) Get() *AffiliateLinkMint {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAffiliateLinkMint) Set(val *AffiliateLinkMint) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAffiliateLinkMint) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAffiliateLinkMint) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAffiliateLinkMint(val *AffiliateLinkMint) *NullableAffiliateLinkMint {
|
|
return &NullableAffiliateLinkMint{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAffiliateLinkMint) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAffiliateLinkMint) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|