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 ReferenceReferenceAnswer type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ReferenceReferenceAnswer{}
|
|
|
|
// ReferenceReferenceAnswer struct for ReferenceReferenceAnswer
|
|
type ReferenceReferenceAnswer struct {
|
|
// Age is how old that is, as a duration.
|
|
Age *string `json:"age,omitempty"`
|
|
// AsOf is when the oldest contributing publisher was current, RFC 3339.
|
|
AsOf *string `json:"asOf,omitempty"`
|
|
// From is override or baseline — which plane answered.
|
|
From *string `json:"from,omitempty"`
|
|
// Hit is whether the key is a member. It is meaningful ONLY when Refusal is empty: false with a refusal means the set could not be consulted, which is not the same as the key being clean.
|
|
Hit *bool `json:"hit,omitempty"`
|
|
// Key is the key as asked.
|
|
Key *string `json:"key,omitempty"`
|
|
// Matched is the member that covered the key, which for a domain or a network is the enclosing entry rather than the key itself.
|
|
Matched *string `json:"matched,omitempty"`
|
|
// Refusal is why the set could not be consulted, when it could not: never loaded, held elsewhere, or a source we hold no licence for. Non-empty means Hit must not be read as an answer.
|
|
Refusal *string `json:"refusal,omitempty"`
|
|
// Score is the published risk weight where the source expresses one.
|
|
Score *float64 `json:"score,omitempty"`
|
|
// Set is the set consulted.
|
|
Set *string `json:"set,omitempty"`
|
|
// Stale is whether the set is past its freshness bound. A stale set still answers — yesterday's list beats none — and this is how a decision knows it leaned on one.
|
|
Stale *bool `json:"stale,omitempty"`
|
|
// Value is what the publisher says about the member — class, operator, scheme, region.
|
|
Value map[string]string `json:"value,omitempty"`
|
|
// Verdict is the tenant's own allow or deny, present only for an override. The baseline never carries one: it states facts and leaves the decision to the caller's policy.
|
|
Verdict *string `json:"verdict,omitempty"`
|
|
// Version is the exact baseline version consulted, composed of each contributing publisher and its content digest. It is what makes a decision reproducible: an auditor takes this string and knows precisely what was consulted.
|
|
Version *string `json:"version,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ReferenceReferenceAnswer ReferenceReferenceAnswer
|
|
|
|
// NewReferenceReferenceAnswer instantiates a new ReferenceReferenceAnswer 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 NewReferenceReferenceAnswer() *ReferenceReferenceAnswer {
|
|
this := ReferenceReferenceAnswer{}
|
|
return &this
|
|
}
|
|
|
|
// NewReferenceReferenceAnswerWithDefaults instantiates a new ReferenceReferenceAnswer 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 NewReferenceReferenceAnswerWithDefaults() *ReferenceReferenceAnswer {
|
|
this := ReferenceReferenceAnswer{}
|
|
return &this
|
|
}
|
|
|
|
// GetAge returns the Age field value if set, zero value otherwise.
|
|
func (o *ReferenceReferenceAnswer) 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 *ReferenceReferenceAnswer) 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 *ReferenceReferenceAnswer) 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 *ReferenceReferenceAnswer) SetAge(v string) {
|
|
o.Age = &v
|
|
}
|
|
|
|
// GetAsOf returns the AsOf field value if set, zero value otherwise.
|
|
func (o *ReferenceReferenceAnswer) 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 *ReferenceReferenceAnswer) 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 *ReferenceReferenceAnswer) 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 *ReferenceReferenceAnswer) SetAsOf(v string) {
|
|
o.AsOf = &v
|
|
}
|
|
|
|
// GetFrom returns the From field value if set, zero value otherwise.
|
|
func (o *ReferenceReferenceAnswer) GetFrom() string {
|
|
if o == nil || IsNil(o.From) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.From
|
|
}
|
|
|
|
// GetFromOk returns a tuple with the From field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ReferenceReferenceAnswer) GetFromOk() (*string, bool) {
|
|
if o == nil || IsNil(o.From) {
|
|
return nil, false
|
|
}
|
|
return o.From, true
|
|
}
|
|
|
|
// HasFrom returns a boolean if a field has been set.
|
|
func (o *ReferenceReferenceAnswer) HasFrom() bool {
|
|
if o != nil && !IsNil(o.From) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFrom gets a reference to the given string and assigns it to the From field.
|
|
func (o *ReferenceReferenceAnswer) SetFrom(v string) {
|
|
o.From = &v
|
|
}
|
|
|
|
// GetHit returns the Hit field value if set, zero value otherwise.
|
|
func (o *ReferenceReferenceAnswer) GetHit() bool {
|
|
if o == nil || IsNil(o.Hit) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Hit
|
|
}
|
|
|
|
// GetHitOk returns a tuple with the Hit field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ReferenceReferenceAnswer) GetHitOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Hit) {
|
|
return nil, false
|
|
}
|
|
return o.Hit, true
|
|
}
|
|
|
|
// HasHit returns a boolean if a field has been set.
|
|
func (o *ReferenceReferenceAnswer) HasHit() bool {
|
|
if o != nil && !IsNil(o.Hit) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetHit gets a reference to the given bool and assigns it to the Hit field.
|
|
func (o *ReferenceReferenceAnswer) SetHit(v bool) {
|
|
o.Hit = &v
|
|
}
|
|
|
|
// GetKey returns the Key field value if set, zero value otherwise.
|
|
func (o *ReferenceReferenceAnswer) GetKey() string {
|
|
if o == nil || IsNil(o.Key) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Key
|
|
}
|
|
|
|
// GetKeyOk returns a tuple with the Key field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ReferenceReferenceAnswer) GetKeyOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Key) {
|
|
return nil, false
|
|
}
|
|
return o.Key, true
|
|
}
|
|
|
|
// HasKey returns a boolean if a field has been set.
|
|
func (o *ReferenceReferenceAnswer) HasKey() bool {
|
|
if o != nil && !IsNil(o.Key) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetKey gets a reference to the given string and assigns it to the Key field.
|
|
func (o *ReferenceReferenceAnswer) SetKey(v string) {
|
|
o.Key = &v
|
|
}
|
|
|
|
// GetMatched returns the Matched field value if set, zero value otherwise.
|
|
func (o *ReferenceReferenceAnswer) GetMatched() string {
|
|
if o == nil || IsNil(o.Matched) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Matched
|
|
}
|
|
|
|
// GetMatchedOk returns a tuple with the Matched field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ReferenceReferenceAnswer) GetMatchedOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Matched) {
|
|
return nil, false
|
|
}
|
|
return o.Matched, true
|
|
}
|
|
|
|
// HasMatched returns a boolean if a field has been set.
|
|
func (o *ReferenceReferenceAnswer) HasMatched() bool {
|
|
if o != nil && !IsNil(o.Matched) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMatched gets a reference to the given string and assigns it to the Matched field.
|
|
func (o *ReferenceReferenceAnswer) SetMatched(v string) {
|
|
o.Matched = &v
|
|
}
|
|
|
|
// GetRefusal returns the Refusal field value if set, zero value otherwise.
|
|
func (o *ReferenceReferenceAnswer) 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 *ReferenceReferenceAnswer) 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 *ReferenceReferenceAnswer) 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 *ReferenceReferenceAnswer) SetRefusal(v string) {
|
|
o.Refusal = &v
|
|
}
|
|
|
|
// GetScore returns the Score field value if set, zero value otherwise.
|
|
func (o *ReferenceReferenceAnswer) GetScore() float64 {
|
|
if o == nil || IsNil(o.Score) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.Score
|
|
}
|
|
|
|
// GetScoreOk returns a tuple with the Score field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ReferenceReferenceAnswer) GetScoreOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.Score) {
|
|
return nil, false
|
|
}
|
|
return o.Score, true
|
|
}
|
|
|
|
// HasScore returns a boolean if a field has been set.
|
|
func (o *ReferenceReferenceAnswer) HasScore() bool {
|
|
if o != nil && !IsNil(o.Score) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetScore gets a reference to the given float64 and assigns it to the Score field.
|
|
func (o *ReferenceReferenceAnswer) SetScore(v float64) {
|
|
o.Score = &v
|
|
}
|
|
|
|
// GetSet returns the Set field value if set, zero value otherwise.
|
|
func (o *ReferenceReferenceAnswer) 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 *ReferenceReferenceAnswer) 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 *ReferenceReferenceAnswer) 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 *ReferenceReferenceAnswer) SetSet(v string) {
|
|
o.Set = &v
|
|
}
|
|
|
|
// GetStale returns the Stale field value if set, zero value otherwise.
|
|
func (o *ReferenceReferenceAnswer) 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 *ReferenceReferenceAnswer) 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 *ReferenceReferenceAnswer) 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 *ReferenceReferenceAnswer) SetStale(v bool) {
|
|
o.Stale = &v
|
|
}
|
|
|
|
// GetValue returns the Value field value if set, zero value otherwise.
|
|
func (o *ReferenceReferenceAnswer) GetValue() map[string]string {
|
|
if o == nil || IsNil(o.Value) {
|
|
var ret map[string]string
|
|
return ret
|
|
}
|
|
return o.Value
|
|
}
|
|
|
|
// GetValueOk returns a tuple with the Value field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ReferenceReferenceAnswer) GetValueOk() (map[string]string, bool) {
|
|
if o == nil || IsNil(o.Value) {
|
|
return map[string]string{}, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// HasValue returns a boolean if a field has been set.
|
|
func (o *ReferenceReferenceAnswer) HasValue() bool {
|
|
if o != nil && !IsNil(o.Value) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetValue gets a reference to the given map[string]string and assigns it to the Value field.
|
|
func (o *ReferenceReferenceAnswer) SetValue(v map[string]string) {
|
|
o.Value = v
|
|
}
|
|
|
|
// GetVerdict returns the Verdict field value if set, zero value otherwise.
|
|
func (o *ReferenceReferenceAnswer) GetVerdict() string {
|
|
if o == nil || IsNil(o.Verdict) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Verdict
|
|
}
|
|
|
|
// GetVerdictOk returns a tuple with the Verdict field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ReferenceReferenceAnswer) GetVerdictOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Verdict) {
|
|
return nil, false
|
|
}
|
|
return o.Verdict, true
|
|
}
|
|
|
|
// HasVerdict returns a boolean if a field has been set.
|
|
func (o *ReferenceReferenceAnswer) HasVerdict() bool {
|
|
if o != nil && !IsNil(o.Verdict) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetVerdict gets a reference to the given string and assigns it to the Verdict field.
|
|
func (o *ReferenceReferenceAnswer) SetVerdict(v string) {
|
|
o.Verdict = &v
|
|
}
|
|
|
|
// GetVersion returns the Version field value if set, zero value otherwise.
|
|
func (o *ReferenceReferenceAnswer) 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 *ReferenceReferenceAnswer) 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 *ReferenceReferenceAnswer) 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 *ReferenceReferenceAnswer) SetVersion(v string) {
|
|
o.Version = &v
|
|
}
|
|
|
|
func (o ReferenceReferenceAnswer) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ReferenceReferenceAnswer) 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.From) {
|
|
toSerialize["from"] = o.From
|
|
}
|
|
if !IsNil(o.Hit) {
|
|
toSerialize["hit"] = o.Hit
|
|
}
|
|
if !IsNil(o.Key) {
|
|
toSerialize["key"] = o.Key
|
|
}
|
|
if !IsNil(o.Matched) {
|
|
toSerialize["matched"] = o.Matched
|
|
}
|
|
if !IsNil(o.Refusal) {
|
|
toSerialize["refusal"] = o.Refusal
|
|
}
|
|
if !IsNil(o.Score) {
|
|
toSerialize["score"] = o.Score
|
|
}
|
|
if !IsNil(o.Set) {
|
|
toSerialize["set"] = o.Set
|
|
}
|
|
if !IsNil(o.Stale) {
|
|
toSerialize["stale"] = o.Stale
|
|
}
|
|
if !IsNil(o.Value) {
|
|
toSerialize["value"] = o.Value
|
|
}
|
|
if !IsNil(o.Verdict) {
|
|
toSerialize["verdict"] = o.Verdict
|
|
}
|
|
if !IsNil(o.Version) {
|
|
toSerialize["version"] = o.Version
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ReferenceReferenceAnswer) UnmarshalJSON(data []byte) (err error) {
|
|
varReferenceReferenceAnswer := _ReferenceReferenceAnswer{}
|
|
|
|
err = json.Unmarshal(data, &varReferenceReferenceAnswer)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ReferenceReferenceAnswer(varReferenceReferenceAnswer)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "age")
|
|
delete(additionalProperties, "asOf")
|
|
delete(additionalProperties, "from")
|
|
delete(additionalProperties, "hit")
|
|
delete(additionalProperties, "key")
|
|
delete(additionalProperties, "matched")
|
|
delete(additionalProperties, "refusal")
|
|
delete(additionalProperties, "score")
|
|
delete(additionalProperties, "set")
|
|
delete(additionalProperties, "stale")
|
|
delete(additionalProperties, "value")
|
|
delete(additionalProperties, "verdict")
|
|
delete(additionalProperties, "version")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableReferenceReferenceAnswer struct {
|
|
value *ReferenceReferenceAnswer
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableReferenceReferenceAnswer) Get() *ReferenceReferenceAnswer {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableReferenceReferenceAnswer) Set(val *ReferenceReferenceAnswer) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableReferenceReferenceAnswer) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableReferenceReferenceAnswer) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableReferenceReferenceAnswer(val *ReferenceReferenceAnswer) *NullableReferenceReferenceAnswer {
|
|
return &NullableReferenceReferenceAnswer{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableReferenceReferenceAnswer) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableReferenceReferenceAnswer) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|