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