Files
sdk/model_provider_slack_conversation.go

345 lines
9.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 ProviderSlackConversation type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ProviderSlackConversation{}
// ProviderSlackConversation struct for ProviderSlackConversation
type ProviderSlackConversation struct {
// ID is the channel ID to pass to message reads and sends.
Id *string `json:"id,omitempty"`
// IsIM identifies a direct message.
IsIm *bool `json:"is_im,omitempty"`
// IsMember reports whether Hanzo has joined this channel.
IsMember *bool `json:"is_member,omitempty"`
// IsMPIM identifies a group direct message.
IsMpim *bool `json:"is_mpim,omitempty"`
// IsPrivate identifies a private channel or conversation.
IsPrivate *bool `json:"is_private,omitempty"`
// Name is the channel name, without #. DMs may have no name.
Name *string `json:"name,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ProviderSlackConversation ProviderSlackConversation
// NewProviderSlackConversation instantiates a new ProviderSlackConversation 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 NewProviderSlackConversation() *ProviderSlackConversation {
this := ProviderSlackConversation{}
return &this
}
// NewProviderSlackConversationWithDefaults instantiates a new ProviderSlackConversation 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 NewProviderSlackConversationWithDefaults() *ProviderSlackConversation {
this := ProviderSlackConversation{}
return &this
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *ProviderSlackConversation) 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 *ProviderSlackConversation) 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 *ProviderSlackConversation) 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 *ProviderSlackConversation) SetId(v string) {
o.Id = &v
}
// GetIsIm returns the IsIm field value if set, zero value otherwise.
func (o *ProviderSlackConversation) GetIsIm() bool {
if o == nil || IsNil(o.IsIm) {
var ret bool
return ret
}
return *o.IsIm
}
// GetIsImOk returns a tuple with the IsIm field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProviderSlackConversation) GetIsImOk() (*bool, bool) {
if o == nil || IsNil(o.IsIm) {
return nil, false
}
return o.IsIm, true
}
// HasIsIm returns a boolean if a field has been set.
func (o *ProviderSlackConversation) HasIsIm() bool {
if o != nil && !IsNil(o.IsIm) {
return true
}
return false
}
// SetIsIm gets a reference to the given bool and assigns it to the IsIm field.
func (o *ProviderSlackConversation) SetIsIm(v bool) {
o.IsIm = &v
}
// GetIsMember returns the IsMember field value if set, zero value otherwise.
func (o *ProviderSlackConversation) GetIsMember() bool {
if o == nil || IsNil(o.IsMember) {
var ret bool
return ret
}
return *o.IsMember
}
// GetIsMemberOk returns a tuple with the IsMember field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProviderSlackConversation) GetIsMemberOk() (*bool, bool) {
if o == nil || IsNil(o.IsMember) {
return nil, false
}
return o.IsMember, true
}
// HasIsMember returns a boolean if a field has been set.
func (o *ProviderSlackConversation) HasIsMember() bool {
if o != nil && !IsNil(o.IsMember) {
return true
}
return false
}
// SetIsMember gets a reference to the given bool and assigns it to the IsMember field.
func (o *ProviderSlackConversation) SetIsMember(v bool) {
o.IsMember = &v
}
// GetIsMpim returns the IsMpim field value if set, zero value otherwise.
func (o *ProviderSlackConversation) GetIsMpim() bool {
if o == nil || IsNil(o.IsMpim) {
var ret bool
return ret
}
return *o.IsMpim
}
// GetIsMpimOk returns a tuple with the IsMpim field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProviderSlackConversation) GetIsMpimOk() (*bool, bool) {
if o == nil || IsNil(o.IsMpim) {
return nil, false
}
return o.IsMpim, true
}
// HasIsMpim returns a boolean if a field has been set.
func (o *ProviderSlackConversation) HasIsMpim() bool {
if o != nil && !IsNil(o.IsMpim) {
return true
}
return false
}
// SetIsMpim gets a reference to the given bool and assigns it to the IsMpim field.
func (o *ProviderSlackConversation) SetIsMpim(v bool) {
o.IsMpim = &v
}
// GetIsPrivate returns the IsPrivate field value if set, zero value otherwise.
func (o *ProviderSlackConversation) GetIsPrivate() bool {
if o == nil || IsNil(o.IsPrivate) {
var ret bool
return ret
}
return *o.IsPrivate
}
// GetIsPrivateOk returns a tuple with the IsPrivate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProviderSlackConversation) GetIsPrivateOk() (*bool, bool) {
if o == nil || IsNil(o.IsPrivate) {
return nil, false
}
return o.IsPrivate, true
}
// HasIsPrivate returns a boolean if a field has been set.
func (o *ProviderSlackConversation) HasIsPrivate() bool {
if o != nil && !IsNil(o.IsPrivate) {
return true
}
return false
}
// SetIsPrivate gets a reference to the given bool and assigns it to the IsPrivate field.
func (o *ProviderSlackConversation) SetIsPrivate(v bool) {
o.IsPrivate = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *ProviderSlackConversation) 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 *ProviderSlackConversation) 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 *ProviderSlackConversation) 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 *ProviderSlackConversation) SetName(v string) {
o.Name = &v
}
func (o ProviderSlackConversation) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ProviderSlackConversation) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.IsIm) {
toSerialize["is_im"] = o.IsIm
}
if !IsNil(o.IsMember) {
toSerialize["is_member"] = o.IsMember
}
if !IsNil(o.IsMpim) {
toSerialize["is_mpim"] = o.IsMpim
}
if !IsNil(o.IsPrivate) {
toSerialize["is_private"] = o.IsPrivate
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ProviderSlackConversation) UnmarshalJSON(data []byte) (err error) {
varProviderSlackConversation := _ProviderSlackConversation{}
err = json.Unmarshal(data, &varProviderSlackConversation)
if err != nil {
return err
}
*o = ProviderSlackConversation(varProviderSlackConversation)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "id")
delete(additionalProperties, "is_im")
delete(additionalProperties, "is_member")
delete(additionalProperties, "is_mpim")
delete(additionalProperties, "is_private")
delete(additionalProperties, "name")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableProviderSlackConversation struct {
value *ProviderSlackConversation
isSet bool
}
func (v NullableProviderSlackConversation) Get() *ProviderSlackConversation {
return v.value
}
func (v *NullableProviderSlackConversation) Set(val *ProviderSlackConversation) {
v.value = val
v.isSet = true
}
func (v NullableProviderSlackConversation) IsSet() bool {
return v.isSet
}
func (v *NullableProviderSlackConversation) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProviderSlackConversation(val *ProviderSlackConversation) *NullableProviderSlackConversation {
return &NullableProviderSlackConversation{value: val, isSet: true}
}
func (v NullableProviderSlackConversation) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProviderSlackConversation) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}