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