Files
sdk/model_world_world_wire.go

307 lines
7.9 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 WorldWorldWire type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &WorldWorldWire{}
// WorldWorldWire struct for WorldWorldWire
type WorldWorldWire struct {
// Auth states what the wire asks of the caller, including which parts of it answer without a token.
Auth *string `json:"auth,omitempty"`
// Name is the wire's short id — rest, mcp or zap.
Name *string `json:"name,omitempty"`
// Path is the address the wire answers on, under this same origin.
Path *string `json:"path,omitempty"`
// Protocol names what the wire speaks, so a caller knows which client to point at it.
Protocol *string `json:"protocol,omitempty"`
// Spec is where this wire's operations are enumerated, when they are enumerated in a document at all. Empty for a wire that describes itself over its own protocol.
Spec *string `json:"spec,omitempty"`
AdditionalProperties map[string]interface{}
}
type _WorldWorldWire WorldWorldWire
// NewWorldWorldWire instantiates a new WorldWorldWire 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 NewWorldWorldWire() *WorldWorldWire {
this := WorldWorldWire{}
return &this
}
// NewWorldWorldWireWithDefaults instantiates a new WorldWorldWire 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 NewWorldWorldWireWithDefaults() *WorldWorldWire {
this := WorldWorldWire{}
return &this
}
// GetAuth returns the Auth field value if set, zero value otherwise.
func (o *WorldWorldWire) GetAuth() string {
if o == nil || IsNil(o.Auth) {
var ret string
return ret
}
return *o.Auth
}
// GetAuthOk returns a tuple with the Auth field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *WorldWorldWire) GetAuthOk() (*string, bool) {
if o == nil || IsNil(o.Auth) {
return nil, false
}
return o.Auth, true
}
// HasAuth returns a boolean if a field has been set.
func (o *WorldWorldWire) HasAuth() bool {
if o != nil && !IsNil(o.Auth) {
return true
}
return false
}
// SetAuth gets a reference to the given string and assigns it to the Auth field.
func (o *WorldWorldWire) SetAuth(v string) {
o.Auth = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *WorldWorldWire) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *WorldWorldWire) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *WorldWorldWire) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *WorldWorldWire) SetName(v string) {
o.Name = &v
}
// GetPath returns the Path field value if set, zero value otherwise.
func (o *WorldWorldWire) GetPath() string {
if o == nil || IsNil(o.Path) {
var ret string
return ret
}
return *o.Path
}
// GetPathOk returns a tuple with the Path field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *WorldWorldWire) GetPathOk() (*string, bool) {
if o == nil || IsNil(o.Path) {
return nil, false
}
return o.Path, true
}
// HasPath returns a boolean if a field has been set.
func (o *WorldWorldWire) HasPath() bool {
if o != nil && !IsNil(o.Path) {
return true
}
return false
}
// SetPath gets a reference to the given string and assigns it to the Path field.
func (o *WorldWorldWire) SetPath(v string) {
o.Path = &v
}
// GetProtocol returns the Protocol field value if set, zero value otherwise.
func (o *WorldWorldWire) GetProtocol() string {
if o == nil || IsNil(o.Protocol) {
var ret string
return ret
}
return *o.Protocol
}
// GetProtocolOk returns a tuple with the Protocol field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *WorldWorldWire) GetProtocolOk() (*string, bool) {
if o == nil || IsNil(o.Protocol) {
return nil, false
}
return o.Protocol, true
}
// HasProtocol returns a boolean if a field has been set.
func (o *WorldWorldWire) HasProtocol() bool {
if o != nil && !IsNil(o.Protocol) {
return true
}
return false
}
// SetProtocol gets a reference to the given string and assigns it to the Protocol field.
func (o *WorldWorldWire) SetProtocol(v string) {
o.Protocol = &v
}
// GetSpec returns the Spec field value if set, zero value otherwise.
func (o *WorldWorldWire) GetSpec() string {
if o == nil || IsNil(o.Spec) {
var ret string
return ret
}
return *o.Spec
}
// GetSpecOk returns a tuple with the Spec field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *WorldWorldWire) GetSpecOk() (*string, bool) {
if o == nil || IsNil(o.Spec) {
return nil, false
}
return o.Spec, true
}
// HasSpec returns a boolean if a field has been set.
func (o *WorldWorldWire) HasSpec() bool {
if o != nil && !IsNil(o.Spec) {
return true
}
return false
}
// SetSpec gets a reference to the given string and assigns it to the Spec field.
func (o *WorldWorldWire) SetSpec(v string) {
o.Spec = &v
}
func (o WorldWorldWire) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o WorldWorldWire) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Auth) {
toSerialize["auth"] = o.Auth
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Path) {
toSerialize["path"] = o.Path
}
if !IsNil(o.Protocol) {
toSerialize["protocol"] = o.Protocol
}
if !IsNil(o.Spec) {
toSerialize["spec"] = o.Spec
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *WorldWorldWire) UnmarshalJSON(data []byte) (err error) {
varWorldWorldWire := _WorldWorldWire{}
err = json.Unmarshal(data, &varWorldWorldWire)
if err != nil {
return err
}
*o = WorldWorldWire(varWorldWorldWire)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "auth")
delete(additionalProperties, "name")
delete(additionalProperties, "path")
delete(additionalProperties, "protocol")
delete(additionalProperties, "spec")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableWorldWorldWire struct {
value *WorldWorldWire
isSet bool
}
func (v NullableWorldWorldWire) Get() *WorldWorldWire {
return v.value
}
func (v *NullableWorldWorldWire) Set(val *WorldWorldWire) {
v.value = val
v.isSet = true
}
func (v NullableWorldWorldWire) IsSet() bool {
return v.isSet
}
func (v *NullableWorldWorldWire) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableWorldWorldWire(val *WorldWorldWire) *NullableWorldWorldWire {
return &NullableWorldWorldWire{value: val, isSet: true}
}
func (v NullableWorldWorldWire) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableWorldWorldWire) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}