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