mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
231 lines
6.1 KiB
Go
231 lines
6.1 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 ProviderJoinFailure type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ProviderJoinFailure{}
|
|
|
|
// ProviderJoinFailure struct for ProviderJoinFailure
|
|
type ProviderJoinFailure struct {
|
|
// Channel is Slack's id for the room that refused.
|
|
Channel *string `json:"channel,omitempty"`
|
|
// Error is Slack's own code, carried through unchanged.
|
|
Error *string `json:"error,omitempty"`
|
|
// Name is that room's human name, so the operator does not have to look the id up.
|
|
Name *string `json:"name,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ProviderJoinFailure ProviderJoinFailure
|
|
|
|
// NewProviderJoinFailure instantiates a new ProviderJoinFailure 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 NewProviderJoinFailure() *ProviderJoinFailure {
|
|
this := ProviderJoinFailure{}
|
|
return &this
|
|
}
|
|
|
|
// NewProviderJoinFailureWithDefaults instantiates a new ProviderJoinFailure 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 NewProviderJoinFailureWithDefaults() *ProviderJoinFailure {
|
|
this := ProviderJoinFailure{}
|
|
return &this
|
|
}
|
|
|
|
// GetChannel returns the Channel field value if set, zero value otherwise.
|
|
func (o *ProviderJoinFailure) GetChannel() string {
|
|
if o == nil || IsNil(o.Channel) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Channel
|
|
}
|
|
|
|
// GetChannelOk returns a tuple with the Channel field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderJoinFailure) GetChannelOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Channel) {
|
|
return nil, false
|
|
}
|
|
return o.Channel, true
|
|
}
|
|
|
|
// HasChannel returns a boolean if a field has been set.
|
|
func (o *ProviderJoinFailure) HasChannel() bool {
|
|
if o != nil && !IsNil(o.Channel) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetChannel gets a reference to the given string and assigns it to the Channel field.
|
|
func (o *ProviderJoinFailure) SetChannel(v string) {
|
|
o.Channel = &v
|
|
}
|
|
|
|
// GetError returns the Error field value if set, zero value otherwise.
|
|
func (o *ProviderJoinFailure) GetError() string {
|
|
if o == nil || IsNil(o.Error) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Error
|
|
}
|
|
|
|
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderJoinFailure) GetErrorOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Error) {
|
|
return nil, false
|
|
}
|
|
return o.Error, true
|
|
}
|
|
|
|
// HasError returns a boolean if a field has been set.
|
|
func (o *ProviderJoinFailure) HasError() bool {
|
|
if o != nil && !IsNil(o.Error) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetError gets a reference to the given string and assigns it to the Error field.
|
|
func (o *ProviderJoinFailure) SetError(v string) {
|
|
o.Error = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *ProviderJoinFailure) 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 *ProviderJoinFailure) 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 *ProviderJoinFailure) 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 *ProviderJoinFailure) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
func (o ProviderJoinFailure) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ProviderJoinFailure) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Channel) {
|
|
toSerialize["channel"] = o.Channel
|
|
}
|
|
if !IsNil(o.Error) {
|
|
toSerialize["error"] = o.Error
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ProviderJoinFailure) UnmarshalJSON(data []byte) (err error) {
|
|
varProviderJoinFailure := _ProviderJoinFailure{}
|
|
|
|
err = json.Unmarshal(data, &varProviderJoinFailure)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ProviderJoinFailure(varProviderJoinFailure)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "channel")
|
|
delete(additionalProperties, "error")
|
|
delete(additionalProperties, "name")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableProviderJoinFailure struct {
|
|
value *ProviderJoinFailure
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableProviderJoinFailure) Get() *ProviderJoinFailure {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableProviderJoinFailure) Set(val *ProviderJoinFailure) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableProviderJoinFailure) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableProviderJoinFailure) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableProviderJoinFailure(val *ProviderJoinFailure) *NullableProviderJoinFailure {
|
|
return &NullableProviderJoinFailure{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableProviderJoinFailure) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableProviderJoinFailure) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|