mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
231 lines
6.8 KiB
Go
231 lines
6.8 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 ReferenceReferenceOverrideIn type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ReferenceReferenceOverrideIn{}
|
|
|
|
// ReferenceReferenceOverrideIn struct for ReferenceReferenceOverrideIn
|
|
type ReferenceReferenceOverrideIn struct {
|
|
// Key is the member: a domain, a CIDR or address, an issuer prefix, a device digest. It is matched the same way the baseline is, so a deny on tempbox.example also covers mail.tempbox.example.
|
|
Key *string `json:"key,omitempty"`
|
|
// Note is why, in your own words. Optional, bounded to 512 bytes.
|
|
Note *string `json:"note,omitempty"`
|
|
// Verdict is allow or deny, and nothing else. An override is a decision — unlike a baseline entry, which states facts and leaves the decision to your policy — because your organisation is the only party entitled to say \"for us, this one is fine\".
|
|
Verdict *string `json:"verdict,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ReferenceReferenceOverrideIn ReferenceReferenceOverrideIn
|
|
|
|
// NewReferenceReferenceOverrideIn instantiates a new ReferenceReferenceOverrideIn 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 NewReferenceReferenceOverrideIn() *ReferenceReferenceOverrideIn {
|
|
this := ReferenceReferenceOverrideIn{}
|
|
return &this
|
|
}
|
|
|
|
// NewReferenceReferenceOverrideInWithDefaults instantiates a new ReferenceReferenceOverrideIn 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 NewReferenceReferenceOverrideInWithDefaults() *ReferenceReferenceOverrideIn {
|
|
this := ReferenceReferenceOverrideIn{}
|
|
return &this
|
|
}
|
|
|
|
// GetKey returns the Key field value if set, zero value otherwise.
|
|
func (o *ReferenceReferenceOverrideIn) 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 *ReferenceReferenceOverrideIn) 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 *ReferenceReferenceOverrideIn) 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 *ReferenceReferenceOverrideIn) SetKey(v string) {
|
|
o.Key = &v
|
|
}
|
|
|
|
// GetNote returns the Note field value if set, zero value otherwise.
|
|
func (o *ReferenceReferenceOverrideIn) GetNote() string {
|
|
if o == nil || IsNil(o.Note) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Note
|
|
}
|
|
|
|
// GetNoteOk returns a tuple with the Note field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ReferenceReferenceOverrideIn) GetNoteOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Note) {
|
|
return nil, false
|
|
}
|
|
return o.Note, true
|
|
}
|
|
|
|
// HasNote returns a boolean if a field has been set.
|
|
func (o *ReferenceReferenceOverrideIn) HasNote() bool {
|
|
if o != nil && !IsNil(o.Note) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNote gets a reference to the given string and assigns it to the Note field.
|
|
func (o *ReferenceReferenceOverrideIn) SetNote(v string) {
|
|
o.Note = &v
|
|
}
|
|
|
|
// GetVerdict returns the Verdict field value if set, zero value otherwise.
|
|
func (o *ReferenceReferenceOverrideIn) 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 *ReferenceReferenceOverrideIn) 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 *ReferenceReferenceOverrideIn) 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 *ReferenceReferenceOverrideIn) SetVerdict(v string) {
|
|
o.Verdict = &v
|
|
}
|
|
|
|
func (o ReferenceReferenceOverrideIn) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ReferenceReferenceOverrideIn) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Key) {
|
|
toSerialize["key"] = o.Key
|
|
}
|
|
if !IsNil(o.Note) {
|
|
toSerialize["note"] = o.Note
|
|
}
|
|
if !IsNil(o.Verdict) {
|
|
toSerialize["verdict"] = o.Verdict
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ReferenceReferenceOverrideIn) UnmarshalJSON(data []byte) (err error) {
|
|
varReferenceReferenceOverrideIn := _ReferenceReferenceOverrideIn{}
|
|
|
|
err = json.Unmarshal(data, &varReferenceReferenceOverrideIn)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ReferenceReferenceOverrideIn(varReferenceReferenceOverrideIn)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "key")
|
|
delete(additionalProperties, "note")
|
|
delete(additionalProperties, "verdict")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableReferenceReferenceOverrideIn struct {
|
|
value *ReferenceReferenceOverrideIn
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableReferenceReferenceOverrideIn) Get() *ReferenceReferenceOverrideIn {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableReferenceReferenceOverrideIn) Set(val *ReferenceReferenceOverrideIn) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableReferenceReferenceOverrideIn) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableReferenceReferenceOverrideIn) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableReferenceReferenceOverrideIn(val *ReferenceReferenceOverrideIn) *NullableReferenceReferenceOverrideIn {
|
|
return &NullableReferenceReferenceOverrideIn{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableReferenceReferenceOverrideIn) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableReferenceReferenceOverrideIn) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|