github.com/optim-corp/cios-golang-sdk@v0.5.1/cios/model_channel.go (about)

     1  /*
     2   * Cios Openapi
     3   *
     4   * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
     5   *
     6   * API version: 1.0.1
     7   */
     8  
     9  // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
    10  
    11  package cios
    12  
    13  import (
    14  	"encoding/json"
    15  )
    16  
    17  // Channel struct for Channel
    18  type Channel struct {
    19  	Id string `json:"id"`
    20  	CreatedAt string `json:"created_at"`
    21  	UpdatedAt string `json:"updated_at"`
    22  	ResourceOwnerId string `json:"resource_owner_id"`
    23  	Name string `json:"name"`
    24  	Description *string `json:"description,omitempty"`
    25  	ChannelProtocols *[]ChannelProtocol `json:"channel_protocols,omitempty"`
    26  	DisplayInfo *[]DisplayInfo `json:"display_info,omitempty"`
    27  	Labels *[]Label `json:"labels,omitempty"`
    28  	MessagingConfig *MessagingConfig `json:"messaging_config,omitempty"`
    29  	DatastoreConfig *DataStoreConfig `json:"datastore_config,omitempty"`
    30  }
    31  
    32  // NewChannel instantiates a new Channel object
    33  // This constructor will assign default values to properties that have it defined,
    34  // and makes sure properties required by API are set, but the set of arguments
    35  // will change when the set of required properties is changed
    36  func NewChannel(id string, createdAt string, updatedAt string, resourceOwnerId string, name string, ) *Channel {
    37  	this := Channel{}
    38  	this.Id = id
    39  	this.CreatedAt = createdAt
    40  	this.UpdatedAt = updatedAt
    41  	this.ResourceOwnerId = resourceOwnerId
    42  	this.Name = name
    43  	return &this
    44  }
    45  
    46  // NewChannelWithDefaults instantiates a new Channel object
    47  // This constructor will only assign default values to properties that have it defined,
    48  // but it doesn't guarantee that properties required by API are set
    49  func NewChannelWithDefaults() *Channel {
    50  	this := Channel{}
    51  	return &this
    52  }
    53  
    54  // GetId returns the Id field value
    55  func (o *Channel) GetId() string {
    56  	if o == nil  {
    57  		var ret string
    58  		return ret
    59  	}
    60  
    61  	return o.Id
    62  }
    63  
    64  // GetIdOk returns a tuple with the Id field value
    65  // and a boolean to check if the value has been set.
    66  func (o *Channel) GetIdOk() (*string, bool) {
    67  	if o == nil  {
    68  		return nil, false
    69  	}
    70  	return &o.Id, true
    71  }
    72  
    73  // SetId sets field value
    74  func (o *Channel) SetId(v string) {
    75  	o.Id = v
    76  }
    77  
    78  // GetCreatedAt returns the CreatedAt field value
    79  func (o *Channel) GetCreatedAt() string {
    80  	if o == nil  {
    81  		var ret string
    82  		return ret
    83  	}
    84  
    85  	return o.CreatedAt
    86  }
    87  
    88  // GetCreatedAtOk returns a tuple with the CreatedAt field value
    89  // and a boolean to check if the value has been set.
    90  func (o *Channel) GetCreatedAtOk() (*string, bool) {
    91  	if o == nil  {
    92  		return nil, false
    93  	}
    94  	return &o.CreatedAt, true
    95  }
    96  
    97  // SetCreatedAt sets field value
    98  func (o *Channel) SetCreatedAt(v string) {
    99  	o.CreatedAt = v
   100  }
   101  
   102  // GetUpdatedAt returns the UpdatedAt field value
   103  func (o *Channel) GetUpdatedAt() string {
   104  	if o == nil  {
   105  		var ret string
   106  		return ret
   107  	}
   108  
   109  	return o.UpdatedAt
   110  }
   111  
   112  // GetUpdatedAtOk returns a tuple with the UpdatedAt field value
   113  // and a boolean to check if the value has been set.
   114  func (o *Channel) GetUpdatedAtOk() (*string, bool) {
   115  	if o == nil  {
   116  		return nil, false
   117  	}
   118  	return &o.UpdatedAt, true
   119  }
   120  
   121  // SetUpdatedAt sets field value
   122  func (o *Channel) SetUpdatedAt(v string) {
   123  	o.UpdatedAt = v
   124  }
   125  
   126  // GetResourceOwnerId returns the ResourceOwnerId field value
   127  func (o *Channel) GetResourceOwnerId() string {
   128  	if o == nil  {
   129  		var ret string
   130  		return ret
   131  	}
   132  
   133  	return o.ResourceOwnerId
   134  }
   135  
   136  // GetResourceOwnerIdOk returns a tuple with the ResourceOwnerId field value
   137  // and a boolean to check if the value has been set.
   138  func (o *Channel) GetResourceOwnerIdOk() (*string, bool) {
   139  	if o == nil  {
   140  		return nil, false
   141  	}
   142  	return &o.ResourceOwnerId, true
   143  }
   144  
   145  // SetResourceOwnerId sets field value
   146  func (o *Channel) SetResourceOwnerId(v string) {
   147  	o.ResourceOwnerId = v
   148  }
   149  
   150  // GetName returns the Name field value
   151  func (o *Channel) GetName() string {
   152  	if o == nil  {
   153  		var ret string
   154  		return ret
   155  	}
   156  
   157  	return o.Name
   158  }
   159  
   160  // GetNameOk returns a tuple with the Name field value
   161  // and a boolean to check if the value has been set.
   162  func (o *Channel) GetNameOk() (*string, bool) {
   163  	if o == nil  {
   164  		return nil, false
   165  	}
   166  	return &o.Name, true
   167  }
   168  
   169  // SetName sets field value
   170  func (o *Channel) SetName(v string) {
   171  	o.Name = v
   172  }
   173  
   174  // GetDescription returns the Description field value if set, zero value otherwise.
   175  func (o *Channel) GetDescription() string {
   176  	if o == nil || o.Description == nil {
   177  		var ret string
   178  		return ret
   179  	}
   180  	return *o.Description
   181  }
   182  
   183  // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
   184  // and a boolean to check if the value has been set.
   185  func (o *Channel) GetDescriptionOk() (*string, bool) {
   186  	if o == nil || o.Description == nil {
   187  		return nil, false
   188  	}
   189  	return o.Description, true
   190  }
   191  
   192  // HasDescription returns a boolean if a field has been set.
   193  func (o *Channel) HasDescription() bool {
   194  	if o != nil && o.Description != nil {
   195  		return true
   196  	}
   197  
   198  	return false
   199  }
   200  
   201  // SetDescription gets a reference to the given string and assigns it to the Description field.
   202  func (o *Channel) SetDescription(v string) {
   203  	o.Description = &v
   204  }
   205  
   206  // GetChannelProtocols returns the ChannelProtocols field value if set, zero value otherwise.
   207  func (o *Channel) GetChannelProtocols() []ChannelProtocol {
   208  	if o == nil || o.ChannelProtocols == nil {
   209  		var ret []ChannelProtocol
   210  		return ret
   211  	}
   212  	return *o.ChannelProtocols
   213  }
   214  
   215  // GetChannelProtocolsOk returns a tuple with the ChannelProtocols field value if set, nil otherwise
   216  // and a boolean to check if the value has been set.
   217  func (o *Channel) GetChannelProtocolsOk() (*[]ChannelProtocol, bool) {
   218  	if o == nil || o.ChannelProtocols == nil {
   219  		return nil, false
   220  	}
   221  	return o.ChannelProtocols, true
   222  }
   223  
   224  // HasChannelProtocols returns a boolean if a field has been set.
   225  func (o *Channel) HasChannelProtocols() bool {
   226  	if o != nil && o.ChannelProtocols != nil {
   227  		return true
   228  	}
   229  
   230  	return false
   231  }
   232  
   233  // SetChannelProtocols gets a reference to the given []ChannelProtocol and assigns it to the ChannelProtocols field.
   234  func (o *Channel) SetChannelProtocols(v []ChannelProtocol) {
   235  	o.ChannelProtocols = &v
   236  }
   237  
   238  // GetDisplayInfo returns the DisplayInfo field value if set, zero value otherwise.
   239  func (o *Channel) GetDisplayInfo() []DisplayInfo {
   240  	if o == nil || o.DisplayInfo == nil {
   241  		var ret []DisplayInfo
   242  		return ret
   243  	}
   244  	return *o.DisplayInfo
   245  }
   246  
   247  // GetDisplayInfoOk returns a tuple with the DisplayInfo field value if set, nil otherwise
   248  // and a boolean to check if the value has been set.
   249  func (o *Channel) GetDisplayInfoOk() (*[]DisplayInfo, bool) {
   250  	if o == nil || o.DisplayInfo == nil {
   251  		return nil, false
   252  	}
   253  	return o.DisplayInfo, true
   254  }
   255  
   256  // HasDisplayInfo returns a boolean if a field has been set.
   257  func (o *Channel) HasDisplayInfo() bool {
   258  	if o != nil && o.DisplayInfo != nil {
   259  		return true
   260  	}
   261  
   262  	return false
   263  }
   264  
   265  // SetDisplayInfo gets a reference to the given []DisplayInfo and assigns it to the DisplayInfo field.
   266  func (o *Channel) SetDisplayInfo(v []DisplayInfo) {
   267  	o.DisplayInfo = &v
   268  }
   269  
   270  // GetLabels returns the Labels field value if set, zero value otherwise.
   271  func (o *Channel) GetLabels() []Label {
   272  	if o == nil || o.Labels == nil {
   273  		var ret []Label
   274  		return ret
   275  	}
   276  	return *o.Labels
   277  }
   278  
   279  // GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
   280  // and a boolean to check if the value has been set.
   281  func (o *Channel) GetLabelsOk() (*[]Label, bool) {
   282  	if o == nil || o.Labels == nil {
   283  		return nil, false
   284  	}
   285  	return o.Labels, true
   286  }
   287  
   288  // HasLabels returns a boolean if a field has been set.
   289  func (o *Channel) HasLabels() bool {
   290  	if o != nil && o.Labels != nil {
   291  		return true
   292  	}
   293  
   294  	return false
   295  }
   296  
   297  // SetLabels gets a reference to the given []Label and assigns it to the Labels field.
   298  func (o *Channel) SetLabels(v []Label) {
   299  	o.Labels = &v
   300  }
   301  
   302  // GetMessagingConfig returns the MessagingConfig field value if set, zero value otherwise.
   303  func (o *Channel) GetMessagingConfig() MessagingConfig {
   304  	if o == nil || o.MessagingConfig == nil {
   305  		var ret MessagingConfig
   306  		return ret
   307  	}
   308  	return *o.MessagingConfig
   309  }
   310  
   311  // GetMessagingConfigOk returns a tuple with the MessagingConfig field value if set, nil otherwise
   312  // and a boolean to check if the value has been set.
   313  func (o *Channel) GetMessagingConfigOk() (*MessagingConfig, bool) {
   314  	if o == nil || o.MessagingConfig == nil {
   315  		return nil, false
   316  	}
   317  	return o.MessagingConfig, true
   318  }
   319  
   320  // HasMessagingConfig returns a boolean if a field has been set.
   321  func (o *Channel) HasMessagingConfig() bool {
   322  	if o != nil && o.MessagingConfig != nil {
   323  		return true
   324  	}
   325  
   326  	return false
   327  }
   328  
   329  // SetMessagingConfig gets a reference to the given MessagingConfig and assigns it to the MessagingConfig field.
   330  func (o *Channel) SetMessagingConfig(v MessagingConfig) {
   331  	o.MessagingConfig = &v
   332  }
   333  
   334  // GetDatastoreConfig returns the DatastoreConfig field value if set, zero value otherwise.
   335  func (o *Channel) GetDatastoreConfig() DataStoreConfig {
   336  	if o == nil || o.DatastoreConfig == nil {
   337  		var ret DataStoreConfig
   338  		return ret
   339  	}
   340  	return *o.DatastoreConfig
   341  }
   342  
   343  // GetDatastoreConfigOk returns a tuple with the DatastoreConfig field value if set, nil otherwise
   344  // and a boolean to check if the value has been set.
   345  func (o *Channel) GetDatastoreConfigOk() (*DataStoreConfig, bool) {
   346  	if o == nil || o.DatastoreConfig == nil {
   347  		return nil, false
   348  	}
   349  	return o.DatastoreConfig, true
   350  }
   351  
   352  // HasDatastoreConfig returns a boolean if a field has been set.
   353  func (o *Channel) HasDatastoreConfig() bool {
   354  	if o != nil && o.DatastoreConfig != nil {
   355  		return true
   356  	}
   357  
   358  	return false
   359  }
   360  
   361  // SetDatastoreConfig gets a reference to the given DataStoreConfig and assigns it to the DatastoreConfig field.
   362  func (o *Channel) SetDatastoreConfig(v DataStoreConfig) {
   363  	o.DatastoreConfig = &v
   364  }
   365  
   366  func (o Channel) MarshalJSON() ([]byte, error) {
   367  	toSerialize := map[string]interface{}{}
   368  	if true {
   369  		toSerialize["id"] = o.Id
   370  	}
   371  	if true {
   372  		toSerialize["created_at"] = o.CreatedAt
   373  	}
   374  	if true {
   375  		toSerialize["updated_at"] = o.UpdatedAt
   376  	}
   377  	if true {
   378  		toSerialize["resource_owner_id"] = o.ResourceOwnerId
   379  	}
   380  	if true {
   381  		toSerialize["name"] = o.Name
   382  	}
   383  	if o.Description != nil {
   384  		toSerialize["description"] = o.Description
   385  	}
   386  	if o.ChannelProtocols != nil {
   387  		toSerialize["channel_protocols"] = o.ChannelProtocols
   388  	}
   389  	if o.DisplayInfo != nil {
   390  		toSerialize["display_info"] = o.DisplayInfo
   391  	}
   392  	if o.Labels != nil {
   393  		toSerialize["labels"] = o.Labels
   394  	}
   395  	if o.MessagingConfig != nil {
   396  		toSerialize["messaging_config"] = o.MessagingConfig
   397  	}
   398  	if o.DatastoreConfig != nil {
   399  		toSerialize["datastore_config"] = o.DatastoreConfig
   400  	}
   401  	return json.Marshal(toSerialize)
   402  }
   403  
   404  type NullableChannel struct {
   405  	value *Channel
   406  	isSet bool
   407  }
   408  
   409  func (v NullableChannel) Get() *Channel {
   410  	return v.value
   411  }
   412  
   413  func (v *NullableChannel) Set(val *Channel) {
   414  	v.value = val
   415  	v.isSet = true
   416  }
   417  
   418  func (v NullableChannel) IsSet() bool {
   419  	return v.isSet
   420  }
   421  
   422  func (v *NullableChannel) Unset() {
   423  	v.value = nil
   424  	v.isSet = false
   425  }
   426  
   427  func NewNullableChannel(val *Channel) *NullableChannel {
   428  	return &NullableChannel{value: val, isSet: true}
   429  }
   430  
   431  func (v NullableChannel) MarshalJSON() ([]byte, error) {
   432  	return json.Marshal(v.value)
   433  }
   434  
   435  func (v *NullableChannel) UnmarshalJSON(src []byte) error {
   436  	v.isSet = true
   437  	return json.Unmarshal(src, &v.value)
   438  }
   439  
   440