github.com/optim-corp/cios-golang-sdk@v0.5.1/cios/model_bucket.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 // Bucket struct for Bucket 18 type Bucket struct { 19 Id string `json:"id"` 20 ResourceOwnerId string `json:"resource_owner_id"` 21 CreatedAt *string `json:"created_at,omitempty"` 22 CreatedBy *CreatedBy `json:"created_by,omitempty"` 23 UpdatedAt *string `json:"updated_at,omitempty"` 24 UpdatedBy *UpdatedBy `json:"updated_by,omitempty"` 25 Name string `json:"name"` 26 Files *BucketFiles `json:"files,omitempty"` 27 } 28 29 // NewBucket instantiates a new Bucket object 30 // This constructor will assign default values to properties that have it defined, 31 // and makes sure properties required by API are set, but the set of arguments 32 // will change when the set of required properties is changed 33 func NewBucket(id string, resourceOwnerId string, name string, ) *Bucket { 34 this := Bucket{} 35 this.Id = id 36 this.ResourceOwnerId = resourceOwnerId 37 this.Name = name 38 return &this 39 } 40 41 // NewBucketWithDefaults instantiates a new Bucket object 42 // This constructor will only assign default values to properties that have it defined, 43 // but it doesn't guarantee that properties required by API are set 44 func NewBucketWithDefaults() *Bucket { 45 this := Bucket{} 46 return &this 47 } 48 49 // GetId returns the Id field value 50 func (o *Bucket) GetId() string { 51 if o == nil { 52 var ret string 53 return ret 54 } 55 56 return o.Id 57 } 58 59 // GetIdOk returns a tuple with the Id field value 60 // and a boolean to check if the value has been set. 61 func (o *Bucket) GetIdOk() (*string, bool) { 62 if o == nil { 63 return nil, false 64 } 65 return &o.Id, true 66 } 67 68 // SetId sets field value 69 func (o *Bucket) SetId(v string) { 70 o.Id = v 71 } 72 73 // GetResourceOwnerId returns the ResourceOwnerId field value 74 func (o *Bucket) GetResourceOwnerId() string { 75 if o == nil { 76 var ret string 77 return ret 78 } 79 80 return o.ResourceOwnerId 81 } 82 83 // GetResourceOwnerIdOk returns a tuple with the ResourceOwnerId field value 84 // and a boolean to check if the value has been set. 85 func (o *Bucket) GetResourceOwnerIdOk() (*string, bool) { 86 if o == nil { 87 return nil, false 88 } 89 return &o.ResourceOwnerId, true 90 } 91 92 // SetResourceOwnerId sets field value 93 func (o *Bucket) SetResourceOwnerId(v string) { 94 o.ResourceOwnerId = v 95 } 96 97 // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. 98 func (o *Bucket) GetCreatedAt() string { 99 if o == nil || o.CreatedAt == nil { 100 var ret string 101 return ret 102 } 103 return *o.CreatedAt 104 } 105 106 // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise 107 // and a boolean to check if the value has been set. 108 func (o *Bucket) GetCreatedAtOk() (*string, bool) { 109 if o == nil || o.CreatedAt == nil { 110 return nil, false 111 } 112 return o.CreatedAt, true 113 } 114 115 // HasCreatedAt returns a boolean if a field has been set. 116 func (o *Bucket) HasCreatedAt() bool { 117 if o != nil && o.CreatedAt != nil { 118 return true 119 } 120 121 return false 122 } 123 124 // SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. 125 func (o *Bucket) SetCreatedAt(v string) { 126 o.CreatedAt = &v 127 } 128 129 // GetCreatedBy returns the CreatedBy field value if set, zero value otherwise. 130 func (o *Bucket) GetCreatedBy() CreatedBy { 131 if o == nil || o.CreatedBy == nil { 132 var ret CreatedBy 133 return ret 134 } 135 return *o.CreatedBy 136 } 137 138 // GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise 139 // and a boolean to check if the value has been set. 140 func (o *Bucket) GetCreatedByOk() (*CreatedBy, bool) { 141 if o == nil || o.CreatedBy == nil { 142 return nil, false 143 } 144 return o.CreatedBy, true 145 } 146 147 // HasCreatedBy returns a boolean if a field has been set. 148 func (o *Bucket) HasCreatedBy() bool { 149 if o != nil && o.CreatedBy != nil { 150 return true 151 } 152 153 return false 154 } 155 156 // SetCreatedBy gets a reference to the given CreatedBy and assigns it to the CreatedBy field. 157 func (o *Bucket) SetCreatedBy(v CreatedBy) { 158 o.CreatedBy = &v 159 } 160 161 // GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. 162 func (o *Bucket) GetUpdatedAt() string { 163 if o == nil || o.UpdatedAt == nil { 164 var ret string 165 return ret 166 } 167 return *o.UpdatedAt 168 } 169 170 // GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise 171 // and a boolean to check if the value has been set. 172 func (o *Bucket) GetUpdatedAtOk() (*string, bool) { 173 if o == nil || o.UpdatedAt == nil { 174 return nil, false 175 } 176 return o.UpdatedAt, true 177 } 178 179 // HasUpdatedAt returns a boolean if a field has been set. 180 func (o *Bucket) HasUpdatedAt() bool { 181 if o != nil && o.UpdatedAt != nil { 182 return true 183 } 184 185 return false 186 } 187 188 // SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. 189 func (o *Bucket) SetUpdatedAt(v string) { 190 o.UpdatedAt = &v 191 } 192 193 // GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise. 194 func (o *Bucket) GetUpdatedBy() UpdatedBy { 195 if o == nil || o.UpdatedBy == nil { 196 var ret UpdatedBy 197 return ret 198 } 199 return *o.UpdatedBy 200 } 201 202 // GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise 203 // and a boolean to check if the value has been set. 204 func (o *Bucket) GetUpdatedByOk() (*UpdatedBy, bool) { 205 if o == nil || o.UpdatedBy == nil { 206 return nil, false 207 } 208 return o.UpdatedBy, true 209 } 210 211 // HasUpdatedBy returns a boolean if a field has been set. 212 func (o *Bucket) HasUpdatedBy() bool { 213 if o != nil && o.UpdatedBy != nil { 214 return true 215 } 216 217 return false 218 } 219 220 // SetUpdatedBy gets a reference to the given UpdatedBy and assigns it to the UpdatedBy field. 221 func (o *Bucket) SetUpdatedBy(v UpdatedBy) { 222 o.UpdatedBy = &v 223 } 224 225 // GetName returns the Name field value 226 func (o *Bucket) GetName() string { 227 if o == nil { 228 var ret string 229 return ret 230 } 231 232 return o.Name 233 } 234 235 // GetNameOk returns a tuple with the Name field value 236 // and a boolean to check if the value has been set. 237 func (o *Bucket) GetNameOk() (*string, bool) { 238 if o == nil { 239 return nil, false 240 } 241 return &o.Name, true 242 } 243 244 // SetName sets field value 245 func (o *Bucket) SetName(v string) { 246 o.Name = v 247 } 248 249 // GetFiles returns the Files field value if set, zero value otherwise. 250 func (o *Bucket) GetFiles() BucketFiles { 251 if o == nil || o.Files == nil { 252 var ret BucketFiles 253 return ret 254 } 255 return *o.Files 256 } 257 258 // GetFilesOk returns a tuple with the Files field value if set, nil otherwise 259 // and a boolean to check if the value has been set. 260 func (o *Bucket) GetFilesOk() (*BucketFiles, bool) { 261 if o == nil || o.Files == nil { 262 return nil, false 263 } 264 return o.Files, true 265 } 266 267 // HasFiles returns a boolean if a field has been set. 268 func (o *Bucket) HasFiles() bool { 269 if o != nil && o.Files != nil { 270 return true 271 } 272 273 return false 274 } 275 276 // SetFiles gets a reference to the given BucketFiles and assigns it to the Files field. 277 func (o *Bucket) SetFiles(v BucketFiles) { 278 o.Files = &v 279 } 280 281 func (o Bucket) MarshalJSON() ([]byte, error) { 282 toSerialize := map[string]interface{}{} 283 if true { 284 toSerialize["id"] = o.Id 285 } 286 if true { 287 toSerialize["resource_owner_id"] = o.ResourceOwnerId 288 } 289 if o.CreatedAt != nil { 290 toSerialize["created_at"] = o.CreatedAt 291 } 292 if o.CreatedBy != nil { 293 toSerialize["created_by"] = o.CreatedBy 294 } 295 if o.UpdatedAt != nil { 296 toSerialize["updated_at"] = o.UpdatedAt 297 } 298 if o.UpdatedBy != nil { 299 toSerialize["updated_by"] = o.UpdatedBy 300 } 301 if true { 302 toSerialize["name"] = o.Name 303 } 304 if o.Files != nil { 305 toSerialize["files"] = o.Files 306 } 307 return json.Marshal(toSerialize) 308 } 309 310 type NullableBucket struct { 311 value *Bucket 312 isSet bool 313 } 314 315 func (v NullableBucket) Get() *Bucket { 316 return v.value 317 } 318 319 func (v *NullableBucket) Set(val *Bucket) { 320 v.value = val 321 v.isSet = true 322 } 323 324 func (v NullableBucket) IsSet() bool { 325 return v.isSet 326 } 327 328 func (v *NullableBucket) Unset() { 329 v.value = nil 330 v.isSet = false 331 } 332 333 func NewNullableBucket(val *Bucket) *NullableBucket { 334 return &NullableBucket{value: val, isSet: true} 335 } 336 337 func (v NullableBucket) MarshalJSON() ([]byte, error) { 338 return json.Marshal(v.value) 339 } 340 341 func (v *NullableBucket) UnmarshalJSON(src []byte) error { 342 v.isSet = true 343 return json.Unmarshal(src, &v.value) 344 } 345 346