github.com/optim-corp/cios-golang-sdk@v0.5.1/cios/model_channel_update_proposal.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  // ChannelUpdateProposal struct for ChannelUpdateProposal
    18  type ChannelUpdateProposal struct {
    19  	ChannelProtocols *[]ChannelProtocol `json:"channel_protocols,omitempty"`
    20  	DisplayInfo []DisplayInfo `json:"display_info"`
    21  	Labels *[]Label `json:"labels,omitempty"`
    22  	MessagingConfig *MessagingConfig `json:"messaging_config,omitempty"`
    23  	DatastoreConfig *DataStoreConfig `json:"datastore_config,omitempty"`
    24  }
    25  
    26  // NewChannelUpdateProposal instantiates a new ChannelUpdateProposal object
    27  // This constructor will assign default values to properties that have it defined,
    28  // and makes sure properties required by API are set, but the set of arguments
    29  // will change when the set of required properties is changed
    30  func NewChannelUpdateProposal(displayInfo []DisplayInfo, ) *ChannelUpdateProposal {
    31  	this := ChannelUpdateProposal{}
    32  	this.DisplayInfo = displayInfo
    33  	return &this
    34  }
    35  
    36  // NewChannelUpdateProposalWithDefaults instantiates a new ChannelUpdateProposal object
    37  // This constructor will only assign default values to properties that have it defined,
    38  // but it doesn't guarantee that properties required by API are set
    39  func NewChannelUpdateProposalWithDefaults() *ChannelUpdateProposal {
    40  	this := ChannelUpdateProposal{}
    41  	return &this
    42  }
    43  
    44  // GetChannelProtocols returns the ChannelProtocols field value if set, zero value otherwise.
    45  func (o *ChannelUpdateProposal) GetChannelProtocols() []ChannelProtocol {
    46  	if o == nil || o.ChannelProtocols == nil {
    47  		var ret []ChannelProtocol
    48  		return ret
    49  	}
    50  	return *o.ChannelProtocols
    51  }
    52  
    53  // GetChannelProtocolsOk returns a tuple with the ChannelProtocols field value if set, nil otherwise
    54  // and a boolean to check if the value has been set.
    55  func (o *ChannelUpdateProposal) GetChannelProtocolsOk() (*[]ChannelProtocol, bool) {
    56  	if o == nil || o.ChannelProtocols == nil {
    57  		return nil, false
    58  	}
    59  	return o.ChannelProtocols, true
    60  }
    61  
    62  // HasChannelProtocols returns a boolean if a field has been set.
    63  func (o *ChannelUpdateProposal) HasChannelProtocols() bool {
    64  	if o != nil && o.ChannelProtocols != nil {
    65  		return true
    66  	}
    67  
    68  	return false
    69  }
    70  
    71  // SetChannelProtocols gets a reference to the given []ChannelProtocol and assigns it to the ChannelProtocols field.
    72  func (o *ChannelUpdateProposal) SetChannelProtocols(v []ChannelProtocol) {
    73  	o.ChannelProtocols = &v
    74  }
    75  
    76  // GetDisplayInfo returns the DisplayInfo field value
    77  func (o *ChannelUpdateProposal) GetDisplayInfo() []DisplayInfo {
    78  	if o == nil  {
    79  		var ret []DisplayInfo
    80  		return ret
    81  	}
    82  
    83  	return o.DisplayInfo
    84  }
    85  
    86  // GetDisplayInfoOk returns a tuple with the DisplayInfo field value
    87  // and a boolean to check if the value has been set.
    88  func (o *ChannelUpdateProposal) GetDisplayInfoOk() (*[]DisplayInfo, bool) {
    89  	if o == nil  {
    90  		return nil, false
    91  	}
    92  	return &o.DisplayInfo, true
    93  }
    94  
    95  // SetDisplayInfo sets field value
    96  func (o *ChannelUpdateProposal) SetDisplayInfo(v []DisplayInfo) {
    97  	o.DisplayInfo = v
    98  }
    99  
   100  // GetLabels returns the Labels field value if set, zero value otherwise.
   101  func (o *ChannelUpdateProposal) GetLabels() []Label {
   102  	if o == nil || o.Labels == nil {
   103  		var ret []Label
   104  		return ret
   105  	}
   106  	return *o.Labels
   107  }
   108  
   109  // GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
   110  // and a boolean to check if the value has been set.
   111  func (o *ChannelUpdateProposal) GetLabelsOk() (*[]Label, bool) {
   112  	if o == nil || o.Labels == nil {
   113  		return nil, false
   114  	}
   115  	return o.Labels, true
   116  }
   117  
   118  // HasLabels returns a boolean if a field has been set.
   119  func (o *ChannelUpdateProposal) HasLabels() bool {
   120  	if o != nil && o.Labels != nil {
   121  		return true
   122  	}
   123  
   124  	return false
   125  }
   126  
   127  // SetLabels gets a reference to the given []Label and assigns it to the Labels field.
   128  func (o *ChannelUpdateProposal) SetLabels(v []Label) {
   129  	o.Labels = &v
   130  }
   131  
   132  // GetMessagingConfig returns the MessagingConfig field value if set, zero value otherwise.
   133  func (o *ChannelUpdateProposal) GetMessagingConfig() MessagingConfig {
   134  	if o == nil || o.MessagingConfig == nil {
   135  		var ret MessagingConfig
   136  		return ret
   137  	}
   138  	return *o.MessagingConfig
   139  }
   140  
   141  // GetMessagingConfigOk returns a tuple with the MessagingConfig field value if set, nil otherwise
   142  // and a boolean to check if the value has been set.
   143  func (o *ChannelUpdateProposal) GetMessagingConfigOk() (*MessagingConfig, bool) {
   144  	if o == nil || o.MessagingConfig == nil {
   145  		return nil, false
   146  	}
   147  	return o.MessagingConfig, true
   148  }
   149  
   150  // HasMessagingConfig returns a boolean if a field has been set.
   151  func (o *ChannelUpdateProposal) HasMessagingConfig() bool {
   152  	if o != nil && o.MessagingConfig != nil {
   153  		return true
   154  	}
   155  
   156  	return false
   157  }
   158  
   159  // SetMessagingConfig gets a reference to the given MessagingConfig and assigns it to the MessagingConfig field.
   160  func (o *ChannelUpdateProposal) SetMessagingConfig(v MessagingConfig) {
   161  	o.MessagingConfig = &v
   162  }
   163  
   164  // GetDatastoreConfig returns the DatastoreConfig field value if set, zero value otherwise.
   165  func (o *ChannelUpdateProposal) GetDatastoreConfig() DataStoreConfig {
   166  	if o == nil || o.DatastoreConfig == nil {
   167  		var ret DataStoreConfig
   168  		return ret
   169  	}
   170  	return *o.DatastoreConfig
   171  }
   172  
   173  // GetDatastoreConfigOk returns a tuple with the DatastoreConfig field value if set, nil otherwise
   174  // and a boolean to check if the value has been set.
   175  func (o *ChannelUpdateProposal) GetDatastoreConfigOk() (*DataStoreConfig, bool) {
   176  	if o == nil || o.DatastoreConfig == nil {
   177  		return nil, false
   178  	}
   179  	return o.DatastoreConfig, true
   180  }
   181  
   182  // HasDatastoreConfig returns a boolean if a field has been set.
   183  func (o *ChannelUpdateProposal) HasDatastoreConfig() bool {
   184  	if o != nil && o.DatastoreConfig != nil {
   185  		return true
   186  	}
   187  
   188  	return false
   189  }
   190  
   191  // SetDatastoreConfig gets a reference to the given DataStoreConfig and assigns it to the DatastoreConfig field.
   192  func (o *ChannelUpdateProposal) SetDatastoreConfig(v DataStoreConfig) {
   193  	o.DatastoreConfig = &v
   194  }
   195  
   196  func (o ChannelUpdateProposal) MarshalJSON() ([]byte, error) {
   197  	toSerialize := map[string]interface{}{}
   198  	if o.ChannelProtocols != nil {
   199  		toSerialize["channel_protocols"] = o.ChannelProtocols
   200  	}
   201  	if true {
   202  		toSerialize["display_info"] = o.DisplayInfo
   203  	}
   204  	if o.Labels != nil {
   205  		toSerialize["labels"] = o.Labels
   206  	}
   207  	if o.MessagingConfig != nil {
   208  		toSerialize["messaging_config"] = o.MessagingConfig
   209  	}
   210  	if o.DatastoreConfig != nil {
   211  		toSerialize["datastore_config"] = o.DatastoreConfig
   212  	}
   213  	return json.Marshal(toSerialize)
   214  }
   215  
   216  type NullableChannelUpdateProposal struct {
   217  	value *ChannelUpdateProposal
   218  	isSet bool
   219  }
   220  
   221  func (v NullableChannelUpdateProposal) Get() *ChannelUpdateProposal {
   222  	return v.value
   223  }
   224  
   225  func (v *NullableChannelUpdateProposal) Set(val *ChannelUpdateProposal) {
   226  	v.value = val
   227  	v.isSet = true
   228  }
   229  
   230  func (v NullableChannelUpdateProposal) IsSet() bool {
   231  	return v.isSet
   232  }
   233  
   234  func (v *NullableChannelUpdateProposal) Unset() {
   235  	v.value = nil
   236  	v.isSet = false
   237  }
   238  
   239  func NewNullableChannelUpdateProposal(val *ChannelUpdateProposal) *NullableChannelUpdateProposal {
   240  	return &NullableChannelUpdateProposal{value: val, isSet: true}
   241  }
   242  
   243  func (v NullableChannelUpdateProposal) MarshalJSON() ([]byte, error) {
   244  	return json.Marshal(v.value)
   245  }
   246  
   247  func (v *NullableChannelUpdateProposal) UnmarshalJSON(src []byte) error {
   248  	v.isSet = true
   249  	return json.Unmarshal(src, &v.value)
   250  }
   251  
   252