mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
269 lines
6.9 KiB
Go
269 lines
6.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 NetworkMeshView type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &NetworkMeshView{}
|
|
|
|
// NetworkMeshView struct for NetworkMeshView
|
|
type NetworkMeshView struct {
|
|
// ID is the ZT edge service's id.
|
|
Id *string `json:"id,omitempty"`
|
|
// Mtls is \"required\" when the service mandates end-to-end encryption, else \"enabled\" — the fabric mutually authenticates every link, so it is never truly off.
|
|
Mtls *string `json:"mtls,omitempty"`
|
|
// Service is the edge service's name.
|
|
Service *string `json:"service,omitempty"`
|
|
// Status is \"active\": a listed service is a configured, dialable mesh entry.
|
|
Status *string `json:"status,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _NetworkMeshView NetworkMeshView
|
|
|
|
// NewNetworkMeshView instantiates a new NetworkMeshView 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 NewNetworkMeshView() *NetworkMeshView {
|
|
this := NetworkMeshView{}
|
|
return &this
|
|
}
|
|
|
|
// NewNetworkMeshViewWithDefaults instantiates a new NetworkMeshView 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 NewNetworkMeshViewWithDefaults() *NetworkMeshView {
|
|
this := NetworkMeshView{}
|
|
return &this
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *NetworkMeshView) GetId() string {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *NetworkMeshView) GetIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Id) {
|
|
return nil, false
|
|
}
|
|
return o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *NetworkMeshView) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *NetworkMeshView) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetMtls returns the Mtls field value if set, zero value otherwise.
|
|
func (o *NetworkMeshView) GetMtls() string {
|
|
if o == nil || IsNil(o.Mtls) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Mtls
|
|
}
|
|
|
|
// GetMtlsOk returns a tuple with the Mtls field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *NetworkMeshView) GetMtlsOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Mtls) {
|
|
return nil, false
|
|
}
|
|
return o.Mtls, true
|
|
}
|
|
|
|
// HasMtls returns a boolean if a field has been set.
|
|
func (o *NetworkMeshView) HasMtls() bool {
|
|
if o != nil && !IsNil(o.Mtls) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMtls gets a reference to the given string and assigns it to the Mtls field.
|
|
func (o *NetworkMeshView) SetMtls(v string) {
|
|
o.Mtls = &v
|
|
}
|
|
|
|
// GetService returns the Service field value if set, zero value otherwise.
|
|
func (o *NetworkMeshView) GetService() string {
|
|
if o == nil || IsNil(o.Service) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Service
|
|
}
|
|
|
|
// GetServiceOk returns a tuple with the Service field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *NetworkMeshView) GetServiceOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Service) {
|
|
return nil, false
|
|
}
|
|
return o.Service, true
|
|
}
|
|
|
|
// HasService returns a boolean if a field has been set.
|
|
func (o *NetworkMeshView) HasService() bool {
|
|
if o != nil && !IsNil(o.Service) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetService gets a reference to the given string and assigns it to the Service field.
|
|
func (o *NetworkMeshView) SetService(v string) {
|
|
o.Service = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *NetworkMeshView) GetStatus() string {
|
|
if o == nil || IsNil(o.Status) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Status
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *NetworkMeshView) GetStatusOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Status) {
|
|
return nil, false
|
|
}
|
|
return o.Status, true
|
|
}
|
|
|
|
// HasStatus returns a boolean if a field has been set.
|
|
func (o *NetworkMeshView) HasStatus() bool {
|
|
if o != nil && !IsNil(o.Status) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
|
func (o *NetworkMeshView) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
func (o NetworkMeshView) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o NetworkMeshView) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Mtls) {
|
|
toSerialize["mtls"] = o.Mtls
|
|
}
|
|
if !IsNil(o.Service) {
|
|
toSerialize["service"] = o.Service
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *NetworkMeshView) UnmarshalJSON(data []byte) (err error) {
|
|
varNetworkMeshView := _NetworkMeshView{}
|
|
|
|
err = json.Unmarshal(data, &varNetworkMeshView)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = NetworkMeshView(varNetworkMeshView)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "mtls")
|
|
delete(additionalProperties, "service")
|
|
delete(additionalProperties, "status")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableNetworkMeshView struct {
|
|
value *NetworkMeshView
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableNetworkMeshView) Get() *NetworkMeshView {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableNetworkMeshView) Set(val *NetworkMeshView) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableNetworkMeshView) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableNetworkMeshView) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableNetworkMeshView(val *NetworkMeshView) *NullableNetworkMeshView {
|
|
return &NullableNetworkMeshView{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableNetworkMeshView) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableNetworkMeshView) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|