mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
611 lines
17 KiB
Go
611 lines
17 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 ReferenceReferenceSet type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ReferenceReferenceSet{}
|
|
|
|
// ReferenceReferenceSet struct for ReferenceReferenceSet
|
|
type ReferenceReferenceSet struct {
|
|
// Age is how long ago that was.
|
|
Age *string `json:"age,omitempty"`
|
|
// AsOf is when the OLDEST contributing publisher was current, RFC 3339. The oldest and not the newest: a set is exactly as fresh as its weakest source.
|
|
AsOf *string `json:"asOf,omitempty"`
|
|
// Keys is how many members the baseline carries.
|
|
Keys *int64 `json:"keys,omitempty"`
|
|
// Kind is how the baseline comes to exist: fetch (downloaded from a publisher), local (computed here), attest (held by the component that screens against it, freshness reported), or gap (declared and NOT held, because the source needs a licence we do not have).
|
|
Kind *string `json:"kind,omitempty"`
|
|
// Match is how a key is tested: exact, domain, net, digits, pattern or range.
|
|
Match *string `json:"match,omitempty"`
|
|
// MaxAge is how old this set may be before it is stale.
|
|
MaxAge *string `json:"maxAge,omitempty"`
|
|
// Overrides is how many entries YOUR org has laid over this baseline.
|
|
Overrides *int64 `json:"overrides,omitempty"`
|
|
// Refusal names why the set cannot be relied on, when it cannot: never loaded, held elsewhere, or a licence we do not hold. Non-empty means a lookup against this set will not answer, rather than answering clean.
|
|
Refusal *string `json:"refusal,omitempty"`
|
|
// Set is the name this set is addressed by.
|
|
Set *string `json:"set,omitempty"`
|
|
// Sources is each contributing publisher, its licence and its own freshness.
|
|
Sources []ReferenceReferenceSource `json:"sources,omitempty"`
|
|
// Stale is whether it is past that bound. A stale set still answers and says so, because yesterday's list beats none.
|
|
Stale *bool `json:"stale,omitempty"`
|
|
// Version is the exact baseline consulted — every contributing publisher and its content digest. A decision records this and an auditor resolves it back.
|
|
Version *string `json:"version,omitempty"`
|
|
// What the set holds, in one sentence.
|
|
What *string `json:"what,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ReferenceReferenceSet ReferenceReferenceSet
|
|
|
|
// NewReferenceReferenceSet instantiates a new ReferenceReferenceSet 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 NewReferenceReferenceSet() *ReferenceReferenceSet {
|
|
this := ReferenceReferenceSet{}
|
|
return &this
|
|
}
|
|
|
|
// NewReferenceReferenceSetWithDefaults instantiates a new ReferenceReferenceSet 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 NewReferenceReferenceSetWithDefaults() *ReferenceReferenceSet {
|
|
this := ReferenceReferenceSet{}
|
|
return &this
|
|
}
|
|
|
|
// GetAge returns the Age field value if set, zero value otherwise.
|
|
func (o *ReferenceReferenceSet) GetAge() string {
|
|
if o == nil || IsNil(o.Age) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Age
|
|
}
|
|
|
|
// GetAgeOk returns a tuple with the Age field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ReferenceReferenceSet) GetAgeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Age) {
|
|
return nil, false
|
|
}
|
|
return o.Age, true
|
|
}
|
|
|
|
// HasAge returns a boolean if a field has been set.
|
|
func (o *ReferenceReferenceSet) HasAge() bool {
|
|
if o != nil && !IsNil(o.Age) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAge gets a reference to the given string and assigns it to the Age field.
|
|
func (o *ReferenceReferenceSet) SetAge(v string) {
|
|
o.Age = &v
|
|
}
|
|
|
|
// GetAsOf returns the AsOf field value if set, zero value otherwise.
|
|
func (o *ReferenceReferenceSet) GetAsOf() string {
|
|
if o == nil || IsNil(o.AsOf) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.AsOf
|
|
}
|
|
|
|
// GetAsOfOk returns a tuple with the AsOf field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ReferenceReferenceSet) GetAsOfOk() (*string, bool) {
|
|
if o == nil || IsNil(o.AsOf) {
|
|
return nil, false
|
|
}
|
|
return o.AsOf, true
|
|
}
|
|
|
|
// HasAsOf returns a boolean if a field has been set.
|
|
func (o *ReferenceReferenceSet) HasAsOf() bool {
|
|
if o != nil && !IsNil(o.AsOf) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAsOf gets a reference to the given string and assigns it to the AsOf field.
|
|
func (o *ReferenceReferenceSet) SetAsOf(v string) {
|
|
o.AsOf = &v
|
|
}
|
|
|
|
// GetKeys returns the Keys field value if set, zero value otherwise.
|
|
func (o *ReferenceReferenceSet) GetKeys() int64 {
|
|
if o == nil || IsNil(o.Keys) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Keys
|
|
}
|
|
|
|
// GetKeysOk returns a tuple with the Keys field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ReferenceReferenceSet) GetKeysOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Keys) {
|
|
return nil, false
|
|
}
|
|
return o.Keys, true
|
|
}
|
|
|
|
// HasKeys returns a boolean if a field has been set.
|
|
func (o *ReferenceReferenceSet) HasKeys() bool {
|
|
if o != nil && !IsNil(o.Keys) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetKeys gets a reference to the given int64 and assigns it to the Keys field.
|
|
func (o *ReferenceReferenceSet) SetKeys(v int64) {
|
|
o.Keys = &v
|
|
}
|
|
|
|
// GetKind returns the Kind field value if set, zero value otherwise.
|
|
func (o *ReferenceReferenceSet) GetKind() string {
|
|
if o == nil || IsNil(o.Kind) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Kind
|
|
}
|
|
|
|
// GetKindOk returns a tuple with the Kind field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ReferenceReferenceSet) GetKindOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Kind) {
|
|
return nil, false
|
|
}
|
|
return o.Kind, true
|
|
}
|
|
|
|
// HasKind returns a boolean if a field has been set.
|
|
func (o *ReferenceReferenceSet) HasKind() bool {
|
|
if o != nil && !IsNil(o.Kind) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetKind gets a reference to the given string and assigns it to the Kind field.
|
|
func (o *ReferenceReferenceSet) SetKind(v string) {
|
|
o.Kind = &v
|
|
}
|
|
|
|
// GetMatch returns the Match field value if set, zero value otherwise.
|
|
func (o *ReferenceReferenceSet) GetMatch() string {
|
|
if o == nil || IsNil(o.Match) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Match
|
|
}
|
|
|
|
// GetMatchOk returns a tuple with the Match field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ReferenceReferenceSet) GetMatchOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Match) {
|
|
return nil, false
|
|
}
|
|
return o.Match, true
|
|
}
|
|
|
|
// HasMatch returns a boolean if a field has been set.
|
|
func (o *ReferenceReferenceSet) HasMatch() bool {
|
|
if o != nil && !IsNil(o.Match) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMatch gets a reference to the given string and assigns it to the Match field.
|
|
func (o *ReferenceReferenceSet) SetMatch(v string) {
|
|
o.Match = &v
|
|
}
|
|
|
|
// GetMaxAge returns the MaxAge field value if set, zero value otherwise.
|
|
func (o *ReferenceReferenceSet) GetMaxAge() string {
|
|
if o == nil || IsNil(o.MaxAge) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.MaxAge
|
|
}
|
|
|
|
// GetMaxAgeOk returns a tuple with the MaxAge field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ReferenceReferenceSet) GetMaxAgeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.MaxAge) {
|
|
return nil, false
|
|
}
|
|
return o.MaxAge, true
|
|
}
|
|
|
|
// HasMaxAge returns a boolean if a field has been set.
|
|
func (o *ReferenceReferenceSet) HasMaxAge() bool {
|
|
if o != nil && !IsNil(o.MaxAge) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMaxAge gets a reference to the given string and assigns it to the MaxAge field.
|
|
func (o *ReferenceReferenceSet) SetMaxAge(v string) {
|
|
o.MaxAge = &v
|
|
}
|
|
|
|
// GetOverrides returns the Overrides field value if set, zero value otherwise.
|
|
func (o *ReferenceReferenceSet) GetOverrides() int64 {
|
|
if o == nil || IsNil(o.Overrides) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Overrides
|
|
}
|
|
|
|
// GetOverridesOk returns a tuple with the Overrides field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ReferenceReferenceSet) GetOverridesOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Overrides) {
|
|
return nil, false
|
|
}
|
|
return o.Overrides, true
|
|
}
|
|
|
|
// HasOverrides returns a boolean if a field has been set.
|
|
func (o *ReferenceReferenceSet) HasOverrides() bool {
|
|
if o != nil && !IsNil(o.Overrides) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOverrides gets a reference to the given int64 and assigns it to the Overrides field.
|
|
func (o *ReferenceReferenceSet) SetOverrides(v int64) {
|
|
o.Overrides = &v
|
|
}
|
|
|
|
// GetRefusal returns the Refusal field value if set, zero value otherwise.
|
|
func (o *ReferenceReferenceSet) GetRefusal() string {
|
|
if o == nil || IsNil(o.Refusal) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Refusal
|
|
}
|
|
|
|
// GetRefusalOk returns a tuple with the Refusal field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ReferenceReferenceSet) GetRefusalOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Refusal) {
|
|
return nil, false
|
|
}
|
|
return o.Refusal, true
|
|
}
|
|
|
|
// HasRefusal returns a boolean if a field has been set.
|
|
func (o *ReferenceReferenceSet) HasRefusal() bool {
|
|
if o != nil && !IsNil(o.Refusal) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRefusal gets a reference to the given string and assigns it to the Refusal field.
|
|
func (o *ReferenceReferenceSet) SetRefusal(v string) {
|
|
o.Refusal = &v
|
|
}
|
|
|
|
// GetSet returns the Set field value if set, zero value otherwise.
|
|
func (o *ReferenceReferenceSet) GetSet() string {
|
|
if o == nil || IsNil(o.Set) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Set
|
|
}
|
|
|
|
// GetSetOk returns a tuple with the Set field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ReferenceReferenceSet) GetSetOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Set) {
|
|
return nil, false
|
|
}
|
|
return o.Set, true
|
|
}
|
|
|
|
// HasSet returns a boolean if a field has been set.
|
|
func (o *ReferenceReferenceSet) HasSet() bool {
|
|
if o != nil && !IsNil(o.Set) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSet gets a reference to the given string and assigns it to the Set field.
|
|
func (o *ReferenceReferenceSet) SetSet(v string) {
|
|
o.Set = &v
|
|
}
|
|
|
|
// GetSources returns the Sources field value if set, zero value otherwise.
|
|
func (o *ReferenceReferenceSet) GetSources() []ReferenceReferenceSource {
|
|
if o == nil || IsNil(o.Sources) {
|
|
var ret []ReferenceReferenceSource
|
|
return ret
|
|
}
|
|
return o.Sources
|
|
}
|
|
|
|
// GetSourcesOk returns a tuple with the Sources field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ReferenceReferenceSet) GetSourcesOk() ([]ReferenceReferenceSource, bool) {
|
|
if o == nil || IsNil(o.Sources) {
|
|
return nil, false
|
|
}
|
|
return o.Sources, true
|
|
}
|
|
|
|
// HasSources returns a boolean if a field has been set.
|
|
func (o *ReferenceReferenceSet) HasSources() bool {
|
|
if o != nil && !IsNil(o.Sources) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSources gets a reference to the given []ReferenceReferenceSource and assigns it to the Sources field.
|
|
func (o *ReferenceReferenceSet) SetSources(v []ReferenceReferenceSource) {
|
|
o.Sources = v
|
|
}
|
|
|
|
// GetStale returns the Stale field value if set, zero value otherwise.
|
|
func (o *ReferenceReferenceSet) GetStale() bool {
|
|
if o == nil || IsNil(o.Stale) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Stale
|
|
}
|
|
|
|
// GetStaleOk returns a tuple with the Stale field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ReferenceReferenceSet) GetStaleOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Stale) {
|
|
return nil, false
|
|
}
|
|
return o.Stale, true
|
|
}
|
|
|
|
// HasStale returns a boolean if a field has been set.
|
|
func (o *ReferenceReferenceSet) HasStale() bool {
|
|
if o != nil && !IsNil(o.Stale) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStale gets a reference to the given bool and assigns it to the Stale field.
|
|
func (o *ReferenceReferenceSet) SetStale(v bool) {
|
|
o.Stale = &v
|
|
}
|
|
|
|
// GetVersion returns the Version field value if set, zero value otherwise.
|
|
func (o *ReferenceReferenceSet) GetVersion() string {
|
|
if o == nil || IsNil(o.Version) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Version
|
|
}
|
|
|
|
// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ReferenceReferenceSet) GetVersionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Version) {
|
|
return nil, false
|
|
}
|
|
return o.Version, true
|
|
}
|
|
|
|
// HasVersion returns a boolean if a field has been set.
|
|
func (o *ReferenceReferenceSet) HasVersion() bool {
|
|
if o != nil && !IsNil(o.Version) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetVersion gets a reference to the given string and assigns it to the Version field.
|
|
func (o *ReferenceReferenceSet) SetVersion(v string) {
|
|
o.Version = &v
|
|
}
|
|
|
|
// GetWhat returns the What field value if set, zero value otherwise.
|
|
func (o *ReferenceReferenceSet) GetWhat() string {
|
|
if o == nil || IsNil(o.What) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.What
|
|
}
|
|
|
|
// GetWhatOk returns a tuple with the What field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ReferenceReferenceSet) GetWhatOk() (*string, bool) {
|
|
if o == nil || IsNil(o.What) {
|
|
return nil, false
|
|
}
|
|
return o.What, true
|
|
}
|
|
|
|
// HasWhat returns a boolean if a field has been set.
|
|
func (o *ReferenceReferenceSet) HasWhat() bool {
|
|
if o != nil && !IsNil(o.What) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetWhat gets a reference to the given string and assigns it to the What field.
|
|
func (o *ReferenceReferenceSet) SetWhat(v string) {
|
|
o.What = &v
|
|
}
|
|
|
|
func (o ReferenceReferenceSet) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ReferenceReferenceSet) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Age) {
|
|
toSerialize["age"] = o.Age
|
|
}
|
|
if !IsNil(o.AsOf) {
|
|
toSerialize["asOf"] = o.AsOf
|
|
}
|
|
if !IsNil(o.Keys) {
|
|
toSerialize["keys"] = o.Keys
|
|
}
|
|
if !IsNil(o.Kind) {
|
|
toSerialize["kind"] = o.Kind
|
|
}
|
|
if !IsNil(o.Match) {
|
|
toSerialize["match"] = o.Match
|
|
}
|
|
if !IsNil(o.MaxAge) {
|
|
toSerialize["maxAge"] = o.MaxAge
|
|
}
|
|
if !IsNil(o.Overrides) {
|
|
toSerialize["overrides"] = o.Overrides
|
|
}
|
|
if !IsNil(o.Refusal) {
|
|
toSerialize["refusal"] = o.Refusal
|
|
}
|
|
if !IsNil(o.Set) {
|
|
toSerialize["set"] = o.Set
|
|
}
|
|
if !IsNil(o.Sources) {
|
|
toSerialize["sources"] = o.Sources
|
|
}
|
|
if !IsNil(o.Stale) {
|
|
toSerialize["stale"] = o.Stale
|
|
}
|
|
if !IsNil(o.Version) {
|
|
toSerialize["version"] = o.Version
|
|
}
|
|
if !IsNil(o.What) {
|
|
toSerialize["what"] = o.What
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ReferenceReferenceSet) UnmarshalJSON(data []byte) (err error) {
|
|
varReferenceReferenceSet := _ReferenceReferenceSet{}
|
|
|
|
err = json.Unmarshal(data, &varReferenceReferenceSet)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ReferenceReferenceSet(varReferenceReferenceSet)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "age")
|
|
delete(additionalProperties, "asOf")
|
|
delete(additionalProperties, "keys")
|
|
delete(additionalProperties, "kind")
|
|
delete(additionalProperties, "match")
|
|
delete(additionalProperties, "maxAge")
|
|
delete(additionalProperties, "overrides")
|
|
delete(additionalProperties, "refusal")
|
|
delete(additionalProperties, "set")
|
|
delete(additionalProperties, "sources")
|
|
delete(additionalProperties, "stale")
|
|
delete(additionalProperties, "version")
|
|
delete(additionalProperties, "what")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableReferenceReferenceSet struct {
|
|
value *ReferenceReferenceSet
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableReferenceReferenceSet) Get() *ReferenceReferenceSet {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableReferenceReferenceSet) Set(val *ReferenceReferenceSet) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableReferenceReferenceSet) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableReferenceReferenceSet) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableReferenceReferenceSet(val *ReferenceReferenceSet) *NullableReferenceReferenceSet {
|
|
return &NullableReferenceReferenceSet{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableReferenceReferenceSet) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableReferenceReferenceSet) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|