mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
269 lines
7.4 KiB
Go
269 lines
7.4 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 ProviderSlackJoinOut type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ProviderSlackJoinOut{}
|
|
|
|
// ProviderSlackJoinOut struct for ProviderSlackJoinOut
|
|
type ProviderSlackJoinOut struct {
|
|
// Already counts the channels it was a member of before, kept apart from Joined because only one of the two is a change.
|
|
Already *int64 `json:"already,omitempty"`
|
|
// Failed is per-channel, so one refusal does not hide the rest of the walk.
|
|
Failed []ProviderJoinFailure `json:"failed,omitempty"`
|
|
// Joined names the channels this run walked into — the change it made.
|
|
Joined []string `json:"joined,omitempty"`
|
|
// Listed is every public, unarchived channel the workspace has.
|
|
Listed *int64 `json:"listed,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ProviderSlackJoinOut ProviderSlackJoinOut
|
|
|
|
// NewProviderSlackJoinOut instantiates a new ProviderSlackJoinOut 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 NewProviderSlackJoinOut() *ProviderSlackJoinOut {
|
|
this := ProviderSlackJoinOut{}
|
|
return &this
|
|
}
|
|
|
|
// NewProviderSlackJoinOutWithDefaults instantiates a new ProviderSlackJoinOut 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 NewProviderSlackJoinOutWithDefaults() *ProviderSlackJoinOut {
|
|
this := ProviderSlackJoinOut{}
|
|
return &this
|
|
}
|
|
|
|
// GetAlready returns the Already field value if set, zero value otherwise.
|
|
func (o *ProviderSlackJoinOut) GetAlready() int64 {
|
|
if o == nil || IsNil(o.Already) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Already
|
|
}
|
|
|
|
// GetAlreadyOk returns a tuple with the Already field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderSlackJoinOut) GetAlreadyOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Already) {
|
|
return nil, false
|
|
}
|
|
return o.Already, true
|
|
}
|
|
|
|
// HasAlready returns a boolean if a field has been set.
|
|
func (o *ProviderSlackJoinOut) HasAlready() bool {
|
|
if o != nil && !IsNil(o.Already) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAlready gets a reference to the given int64 and assigns it to the Already field.
|
|
func (o *ProviderSlackJoinOut) SetAlready(v int64) {
|
|
o.Already = &v
|
|
}
|
|
|
|
// GetFailed returns the Failed field value if set, zero value otherwise.
|
|
func (o *ProviderSlackJoinOut) GetFailed() []ProviderJoinFailure {
|
|
if o == nil || IsNil(o.Failed) {
|
|
var ret []ProviderJoinFailure
|
|
return ret
|
|
}
|
|
return o.Failed
|
|
}
|
|
|
|
// GetFailedOk returns a tuple with the Failed field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderSlackJoinOut) GetFailedOk() ([]ProviderJoinFailure, bool) {
|
|
if o == nil || IsNil(o.Failed) {
|
|
return nil, false
|
|
}
|
|
return o.Failed, true
|
|
}
|
|
|
|
// HasFailed returns a boolean if a field has been set.
|
|
func (o *ProviderSlackJoinOut) HasFailed() bool {
|
|
if o != nil && !IsNil(o.Failed) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFailed gets a reference to the given []ProviderJoinFailure and assigns it to the Failed field.
|
|
func (o *ProviderSlackJoinOut) SetFailed(v []ProviderJoinFailure) {
|
|
o.Failed = v
|
|
}
|
|
|
|
// GetJoined returns the Joined field value if set, zero value otherwise.
|
|
func (o *ProviderSlackJoinOut) GetJoined() []string {
|
|
if o == nil || IsNil(o.Joined) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Joined
|
|
}
|
|
|
|
// GetJoinedOk returns a tuple with the Joined field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderSlackJoinOut) GetJoinedOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Joined) {
|
|
return nil, false
|
|
}
|
|
return o.Joined, true
|
|
}
|
|
|
|
// HasJoined returns a boolean if a field has been set.
|
|
func (o *ProviderSlackJoinOut) HasJoined() bool {
|
|
if o != nil && !IsNil(o.Joined) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetJoined gets a reference to the given []string and assigns it to the Joined field.
|
|
func (o *ProviderSlackJoinOut) SetJoined(v []string) {
|
|
o.Joined = v
|
|
}
|
|
|
|
// GetListed returns the Listed field value if set, zero value otherwise.
|
|
func (o *ProviderSlackJoinOut) GetListed() int64 {
|
|
if o == nil || IsNil(o.Listed) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Listed
|
|
}
|
|
|
|
// GetListedOk returns a tuple with the Listed field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderSlackJoinOut) GetListedOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Listed) {
|
|
return nil, false
|
|
}
|
|
return o.Listed, true
|
|
}
|
|
|
|
// HasListed returns a boolean if a field has been set.
|
|
func (o *ProviderSlackJoinOut) HasListed() bool {
|
|
if o != nil && !IsNil(o.Listed) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetListed gets a reference to the given int64 and assigns it to the Listed field.
|
|
func (o *ProviderSlackJoinOut) SetListed(v int64) {
|
|
o.Listed = &v
|
|
}
|
|
|
|
func (o ProviderSlackJoinOut) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ProviderSlackJoinOut) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Already) {
|
|
toSerialize["already"] = o.Already
|
|
}
|
|
if !IsNil(o.Failed) {
|
|
toSerialize["failed"] = o.Failed
|
|
}
|
|
if !IsNil(o.Joined) {
|
|
toSerialize["joined"] = o.Joined
|
|
}
|
|
if !IsNil(o.Listed) {
|
|
toSerialize["listed"] = o.Listed
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ProviderSlackJoinOut) UnmarshalJSON(data []byte) (err error) {
|
|
varProviderSlackJoinOut := _ProviderSlackJoinOut{}
|
|
|
|
err = json.Unmarshal(data, &varProviderSlackJoinOut)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ProviderSlackJoinOut(varProviderSlackJoinOut)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "already")
|
|
delete(additionalProperties, "failed")
|
|
delete(additionalProperties, "joined")
|
|
delete(additionalProperties, "listed")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableProviderSlackJoinOut struct {
|
|
value *ProviderSlackJoinOut
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableProviderSlackJoinOut) Get() *ProviderSlackJoinOut {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableProviderSlackJoinOut) Set(val *ProviderSlackJoinOut) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableProviderSlackJoinOut) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableProviderSlackJoinOut) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableProviderSlackJoinOut(val *ProviderSlackJoinOut) *NullableProviderSlackJoinOut {
|
|
return &NullableProviderSlackJoinOut{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableProviderSlackJoinOut) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableProviderSlackJoinOut) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|