Files
sdk/model_provider_device_start_in.go

193 lines
5.3 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 ProviderDeviceStartIn type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ProviderDeviceStartIn{}
// ProviderDeviceStartIn struct for ProviderDeviceStartIn
type ProviderDeviceStartIn struct {
// Label names this connection so one user can hold several per provider (\"work\", \"personal\"). Empty means \"default\". 1-64 of [A-Za-z0-9._-].
Label *string `json:"label,omitempty"`
// Provider is the user-scoped provider's registry id, from the path.
Provider *string `json:"provider,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ProviderDeviceStartIn ProviderDeviceStartIn
// NewProviderDeviceStartIn instantiates a new ProviderDeviceStartIn 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 NewProviderDeviceStartIn() *ProviderDeviceStartIn {
this := ProviderDeviceStartIn{}
return &this
}
// NewProviderDeviceStartInWithDefaults instantiates a new ProviderDeviceStartIn 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 NewProviderDeviceStartInWithDefaults() *ProviderDeviceStartIn {
this := ProviderDeviceStartIn{}
return &this
}
// GetLabel returns the Label field value if set, zero value otherwise.
func (o *ProviderDeviceStartIn) GetLabel() string {
if o == nil || IsNil(o.Label) {
var ret string
return ret
}
return *o.Label
}
// GetLabelOk returns a tuple with the Label field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProviderDeviceStartIn) GetLabelOk() (*string, bool) {
if o == nil || IsNil(o.Label) {
return nil, false
}
return o.Label, true
}
// HasLabel returns a boolean if a field has been set.
func (o *ProviderDeviceStartIn) HasLabel() bool {
if o != nil && !IsNil(o.Label) {
return true
}
return false
}
// SetLabel gets a reference to the given string and assigns it to the Label field.
func (o *ProviderDeviceStartIn) SetLabel(v string) {
o.Label = &v
}
// GetProvider returns the Provider field value if set, zero value otherwise.
func (o *ProviderDeviceStartIn) GetProvider() string {
if o == nil || IsNil(o.Provider) {
var ret string
return ret
}
return *o.Provider
}
// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProviderDeviceStartIn) GetProviderOk() (*string, bool) {
if o == nil || IsNil(o.Provider) {
return nil, false
}
return o.Provider, true
}
// HasProvider returns a boolean if a field has been set.
func (o *ProviderDeviceStartIn) HasProvider() bool {
if o != nil && !IsNil(o.Provider) {
return true
}
return false
}
// SetProvider gets a reference to the given string and assigns it to the Provider field.
func (o *ProviderDeviceStartIn) SetProvider(v string) {
o.Provider = &v
}
func (o ProviderDeviceStartIn) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ProviderDeviceStartIn) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Label) {
toSerialize["label"] = o.Label
}
if !IsNil(o.Provider) {
toSerialize["provider"] = o.Provider
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ProviderDeviceStartIn) UnmarshalJSON(data []byte) (err error) {
varProviderDeviceStartIn := _ProviderDeviceStartIn{}
err = json.Unmarshal(data, &varProviderDeviceStartIn)
if err != nil {
return err
}
*o = ProviderDeviceStartIn(varProviderDeviceStartIn)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "label")
delete(additionalProperties, "provider")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableProviderDeviceStartIn struct {
value *ProviderDeviceStartIn
isSet bool
}
func (v NullableProviderDeviceStartIn) Get() *ProviderDeviceStartIn {
return v.value
}
func (v *NullableProviderDeviceStartIn) Set(val *ProviderDeviceStartIn) {
v.value = val
v.isSet = true
}
func (v NullableProviderDeviceStartIn) IsSet() bool {
return v.isSet
}
func (v *NullableProviderDeviceStartIn) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProviderDeviceStartIn(val *ProviderDeviceStartIn) *NullableProviderDeviceStartIn {
return &NullableProviderDeviceStartIn{value: val, isSet: true}
}
func (v NullableProviderDeviceStartIn) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProviderDeviceStartIn) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}