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 ProviderSlackReactIn type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ProviderSlackReactIn{}
|
|
|
|
// ProviderSlackReactIn struct for ProviderSlackReactIn
|
|
type ProviderSlackReactIn struct {
|
|
// Channel is a Slack channel ID, name (#hanzo-gtm), or channel mention.
|
|
Channel *string `json:"channel,omitempty"`
|
|
// Name is the emoji's name WITHOUT colons — \"eyes\", not \":eyes:\".
|
|
Name *string `json:"name,omitempty"`
|
|
// TS is the exact timestamp of the message to react to.
|
|
Ts *string `json:"ts,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ProviderSlackReactIn ProviderSlackReactIn
|
|
|
|
// NewProviderSlackReactIn instantiates a new ProviderSlackReactIn 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 NewProviderSlackReactIn() *ProviderSlackReactIn {
|
|
this := ProviderSlackReactIn{}
|
|
return &this
|
|
}
|
|
|
|
// NewProviderSlackReactInWithDefaults instantiates a new ProviderSlackReactIn 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 NewProviderSlackReactInWithDefaults() *ProviderSlackReactIn {
|
|
this := ProviderSlackReactIn{}
|
|
return &this
|
|
}
|
|
|
|
// GetChannel returns the Channel field value if set, zero value otherwise.
|
|
func (o *ProviderSlackReactIn) 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 *ProviderSlackReactIn) 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 *ProviderSlackReactIn) 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 *ProviderSlackReactIn) SetChannel(v string) {
|
|
o.Channel = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *ProviderSlackReactIn) 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 *ProviderSlackReactIn) 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 *ProviderSlackReactIn) 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 *ProviderSlackReactIn) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetTs returns the Ts field value if set, zero value otherwise.
|
|
func (o *ProviderSlackReactIn) GetTs() string {
|
|
if o == nil || IsNil(o.Ts) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Ts
|
|
}
|
|
|
|
// GetTsOk returns a tuple with the Ts field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderSlackReactIn) GetTsOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Ts) {
|
|
return nil, false
|
|
}
|
|
return o.Ts, true
|
|
}
|
|
|
|
// HasTs returns a boolean if a field has been set.
|
|
func (o *ProviderSlackReactIn) HasTs() bool {
|
|
if o != nil && !IsNil(o.Ts) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTs gets a reference to the given string and assigns it to the Ts field.
|
|
func (o *ProviderSlackReactIn) SetTs(v string) {
|
|
o.Ts = &v
|
|
}
|
|
|
|
func (o ProviderSlackReactIn) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ProviderSlackReactIn) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Channel) {
|
|
toSerialize["channel"] = o.Channel
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Ts) {
|
|
toSerialize["ts"] = o.Ts
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ProviderSlackReactIn) UnmarshalJSON(data []byte) (err error) {
|
|
varProviderSlackReactIn := _ProviderSlackReactIn{}
|
|
|
|
err = json.Unmarshal(data, &varProviderSlackReactIn)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ProviderSlackReactIn(varProviderSlackReactIn)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "channel")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "ts")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableProviderSlackReactIn struct {
|
|
value *ProviderSlackReactIn
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableProviderSlackReactIn) Get() *ProviderSlackReactIn {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableProviderSlackReactIn) Set(val *ProviderSlackReactIn) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableProviderSlackReactIn) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableProviderSlackReactIn) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableProviderSlackReactIn(val *ProviderSlackReactIn) *NullableProviderSlackReactIn {
|
|
return &NullableProviderSlackReactIn{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableProviderSlackReactIn) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableProviderSlackReactIn) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|