Files
sdk/model_reference_resolve_reference_in.go

193 lines
5.5 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 ReferenceResolveReferenceIn type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ReferenceResolveReferenceIn{}
// ReferenceResolveReferenceIn struct for ReferenceResolveReferenceIn
type ReferenceResolveReferenceIn struct {
// Keys are the values to look up, at most 100 per call: email addresses or domains, IP addresses, card prefixes, user-agent strings, autonomous system numbers, device digests.
Keys []string `json:"keys,omitempty"`
// Sets narrows which sets to consult. Empty consults every set whose matcher can read the keys given.
Sets []string `json:"sets,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ReferenceResolveReferenceIn ReferenceResolveReferenceIn
// NewReferenceResolveReferenceIn instantiates a new ReferenceResolveReferenceIn 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 NewReferenceResolveReferenceIn() *ReferenceResolveReferenceIn {
this := ReferenceResolveReferenceIn{}
return &this
}
// NewReferenceResolveReferenceInWithDefaults instantiates a new ReferenceResolveReferenceIn 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 NewReferenceResolveReferenceInWithDefaults() *ReferenceResolveReferenceIn {
this := ReferenceResolveReferenceIn{}
return &this
}
// GetKeys returns the Keys field value if set, zero value otherwise.
func (o *ReferenceResolveReferenceIn) GetKeys() []string {
if o == nil || IsNil(o.Keys) {
var ret []string
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 *ReferenceResolveReferenceIn) GetKeysOk() ([]string, 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 *ReferenceResolveReferenceIn) HasKeys() bool {
if o != nil && !IsNil(o.Keys) {
return true
}
return false
}
// SetKeys gets a reference to the given []string and assigns it to the Keys field.
func (o *ReferenceResolveReferenceIn) SetKeys(v []string) {
o.Keys = v
}
// GetSets returns the Sets field value if set, zero value otherwise.
func (o *ReferenceResolveReferenceIn) GetSets() []string {
if o == nil || IsNil(o.Sets) {
var ret []string
return ret
}
return o.Sets
}
// GetSetsOk returns a tuple with the Sets field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ReferenceResolveReferenceIn) GetSetsOk() ([]string, bool) {
if o == nil || IsNil(o.Sets) {
return nil, false
}
return o.Sets, true
}
// HasSets returns a boolean if a field has been set.
func (o *ReferenceResolveReferenceIn) HasSets() bool {
if o != nil && !IsNil(o.Sets) {
return true
}
return false
}
// SetSets gets a reference to the given []string and assigns it to the Sets field.
func (o *ReferenceResolveReferenceIn) SetSets(v []string) {
o.Sets = v
}
func (o ReferenceResolveReferenceIn) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ReferenceResolveReferenceIn) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Keys) {
toSerialize["keys"] = o.Keys
}
if !IsNil(o.Sets) {
toSerialize["sets"] = o.Sets
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ReferenceResolveReferenceIn) UnmarshalJSON(data []byte) (err error) {
varReferenceResolveReferenceIn := _ReferenceResolveReferenceIn{}
err = json.Unmarshal(data, &varReferenceResolveReferenceIn)
if err != nil {
return err
}
*o = ReferenceResolveReferenceIn(varReferenceResolveReferenceIn)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "keys")
delete(additionalProperties, "sets")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableReferenceResolveReferenceIn struct {
value *ReferenceResolveReferenceIn
isSet bool
}
func (v NullableReferenceResolveReferenceIn) Get() *ReferenceResolveReferenceIn {
return v.value
}
func (v *NullableReferenceResolveReferenceIn) Set(val *ReferenceResolveReferenceIn) {
v.value = val
v.isSet = true
}
func (v NullableReferenceResolveReferenceIn) IsSet() bool {
return v.isSet
}
func (v *NullableReferenceResolveReferenceIn) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableReferenceResolveReferenceIn(val *ReferenceResolveReferenceIn) *NullableReferenceResolveReferenceIn {
return &NullableReferenceResolveReferenceIn{value: val, isSet: true}
}
func (v NullableReferenceResolveReferenceIn) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableReferenceResolveReferenceIn) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}