bunnyshell.com/sdk@v0.16.0/model_pipeline_collection.go (about) 1 /* 2 API Bunnyshell Environments 3 4 Interact with Bunnyshell Platform 5 6 API version: 1.1.0 7 Contact: osi+support@bunnyshell.com 8 */ 9 10 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 11 12 package sdk 13 14 import ( 15 "encoding/json" 16 ) 17 18 // checks if the PipelineCollection type satisfies the MappedNullable interface at compile time 19 var _ MappedNullable = &PipelineCollection{} 20 21 // PipelineCollection A pipeline. 22 type PipelineCollection struct { 23 // Pipeline identifier. 24 Id *string `json:"id,omitempty"` 25 // Pipeline description. 26 Description *string `json:"description,omitempty"` 27 // Pipeline status. 28 Status *string `json:"status,omitempty"` 29 // Environment identifier. 30 Environment NullableString `json:"environment,omitempty"` 31 // Event identifier. 32 Event *string `json:"event,omitempty"` 33 // Pipeline web URL. 34 WebUrl *string `json:"webUrl,omitempty"` 35 // Organization identifier. 36 Organization *string `json:"organization,omitempty"` 37 } 38 39 // NewPipelineCollection instantiates a new PipelineCollection object 40 // This constructor will assign default values to properties that have it defined, 41 // and makes sure properties required by API are set, but the set of arguments 42 // will change when the set of required properties is changed 43 func NewPipelineCollection() *PipelineCollection { 44 this := PipelineCollection{} 45 return &this 46 } 47 48 // NewPipelineCollectionWithDefaults instantiates a new PipelineCollection object 49 // This constructor will only assign default values to properties that have it defined, 50 // but it doesn't guarantee that properties required by API are set 51 func NewPipelineCollectionWithDefaults() *PipelineCollection { 52 this := PipelineCollection{} 53 return &this 54 } 55 56 // GetId returns the Id field value if set, zero value otherwise. 57 func (o *PipelineCollection) GetId() string { 58 if o == nil || IsNil(o.Id) { 59 var ret string 60 return ret 61 } 62 return *o.Id 63 } 64 65 // GetIdOk returns a tuple with the Id field value if set, nil otherwise 66 // and a boolean to check if the value has been set. 67 func (o *PipelineCollection) GetIdOk() (*string, bool) { 68 if o == nil || IsNil(o.Id) { 69 return nil, false 70 } 71 return o.Id, true 72 } 73 74 // HasId returns a boolean if a field has been set. 75 func (o *PipelineCollection) HasId() bool { 76 if o != nil && !IsNil(o.Id) { 77 return true 78 } 79 80 return false 81 } 82 83 // SetId gets a reference to the given string and assigns it to the Id field. 84 func (o *PipelineCollection) SetId(v string) { 85 o.Id = &v 86 } 87 88 // GetDescription returns the Description field value if set, zero value otherwise. 89 func (o *PipelineCollection) GetDescription() string { 90 if o == nil || IsNil(o.Description) { 91 var ret string 92 return ret 93 } 94 return *o.Description 95 } 96 97 // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise 98 // and a boolean to check if the value has been set. 99 func (o *PipelineCollection) GetDescriptionOk() (*string, bool) { 100 if o == nil || IsNil(o.Description) { 101 return nil, false 102 } 103 return o.Description, true 104 } 105 106 // HasDescription returns a boolean if a field has been set. 107 func (o *PipelineCollection) HasDescription() bool { 108 if o != nil && !IsNil(o.Description) { 109 return true 110 } 111 112 return false 113 } 114 115 // SetDescription gets a reference to the given string and assigns it to the Description field. 116 func (o *PipelineCollection) SetDescription(v string) { 117 o.Description = &v 118 } 119 120 // GetStatus returns the Status field value if set, zero value otherwise. 121 func (o *PipelineCollection) GetStatus() string { 122 if o == nil || IsNil(o.Status) { 123 var ret string 124 return ret 125 } 126 return *o.Status 127 } 128 129 // GetStatusOk returns a tuple with the Status field value if set, nil otherwise 130 // and a boolean to check if the value has been set. 131 func (o *PipelineCollection) GetStatusOk() (*string, bool) { 132 if o == nil || IsNil(o.Status) { 133 return nil, false 134 } 135 return o.Status, true 136 } 137 138 // HasStatus returns a boolean if a field has been set. 139 func (o *PipelineCollection) HasStatus() bool { 140 if o != nil && !IsNil(o.Status) { 141 return true 142 } 143 144 return false 145 } 146 147 // SetStatus gets a reference to the given string and assigns it to the Status field. 148 func (o *PipelineCollection) SetStatus(v string) { 149 o.Status = &v 150 } 151 152 // GetEnvironment returns the Environment field value if set, zero value otherwise (both if not set or set to explicit null). 153 func (o *PipelineCollection) GetEnvironment() string { 154 if o == nil || IsNil(o.Environment.Get()) { 155 var ret string 156 return ret 157 } 158 return *o.Environment.Get() 159 } 160 161 // GetEnvironmentOk returns a tuple with the Environment field value if set, nil otherwise 162 // and a boolean to check if the value has been set. 163 // NOTE: If the value is an explicit nil, `nil, true` will be returned 164 func (o *PipelineCollection) GetEnvironmentOk() (*string, bool) { 165 if o == nil { 166 return nil, false 167 } 168 return o.Environment.Get(), o.Environment.IsSet() 169 } 170 171 // HasEnvironment returns a boolean if a field has been set. 172 func (o *PipelineCollection) HasEnvironment() bool { 173 if o != nil && o.Environment.IsSet() { 174 return true 175 } 176 177 return false 178 } 179 180 // SetEnvironment gets a reference to the given NullableString and assigns it to the Environment field. 181 func (o *PipelineCollection) SetEnvironment(v string) { 182 o.Environment.Set(&v) 183 } 184 185 // SetEnvironmentNil sets the value for Environment to be an explicit nil 186 func (o *PipelineCollection) SetEnvironmentNil() { 187 o.Environment.Set(nil) 188 } 189 190 // UnsetEnvironment ensures that no value is present for Environment, not even an explicit nil 191 func (o *PipelineCollection) UnsetEnvironment() { 192 o.Environment.Unset() 193 } 194 195 // GetEvent returns the Event field value if set, zero value otherwise. 196 func (o *PipelineCollection) GetEvent() string { 197 if o == nil || IsNil(o.Event) { 198 var ret string 199 return ret 200 } 201 return *o.Event 202 } 203 204 // GetEventOk returns a tuple with the Event field value if set, nil otherwise 205 // and a boolean to check if the value has been set. 206 func (o *PipelineCollection) GetEventOk() (*string, bool) { 207 if o == nil || IsNil(o.Event) { 208 return nil, false 209 } 210 return o.Event, true 211 } 212 213 // HasEvent returns a boolean if a field has been set. 214 func (o *PipelineCollection) HasEvent() bool { 215 if o != nil && !IsNil(o.Event) { 216 return true 217 } 218 219 return false 220 } 221 222 // SetEvent gets a reference to the given string and assigns it to the Event field. 223 func (o *PipelineCollection) SetEvent(v string) { 224 o.Event = &v 225 } 226 227 // GetWebUrl returns the WebUrl field value if set, zero value otherwise. 228 func (o *PipelineCollection) GetWebUrl() string { 229 if o == nil || IsNil(o.WebUrl) { 230 var ret string 231 return ret 232 } 233 return *o.WebUrl 234 } 235 236 // GetWebUrlOk returns a tuple with the WebUrl field value if set, nil otherwise 237 // and a boolean to check if the value has been set. 238 func (o *PipelineCollection) GetWebUrlOk() (*string, bool) { 239 if o == nil || IsNil(o.WebUrl) { 240 return nil, false 241 } 242 return o.WebUrl, true 243 } 244 245 // HasWebUrl returns a boolean if a field has been set. 246 func (o *PipelineCollection) HasWebUrl() bool { 247 if o != nil && !IsNil(o.WebUrl) { 248 return true 249 } 250 251 return false 252 } 253 254 // SetWebUrl gets a reference to the given string and assigns it to the WebUrl field. 255 func (o *PipelineCollection) SetWebUrl(v string) { 256 o.WebUrl = &v 257 } 258 259 // GetOrganization returns the Organization field value if set, zero value otherwise. 260 func (o *PipelineCollection) GetOrganization() string { 261 if o == nil || IsNil(o.Organization) { 262 var ret string 263 return ret 264 } 265 return *o.Organization 266 } 267 268 // GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise 269 // and a boolean to check if the value has been set. 270 func (o *PipelineCollection) GetOrganizationOk() (*string, bool) { 271 if o == nil || IsNil(o.Organization) { 272 return nil, false 273 } 274 return o.Organization, true 275 } 276 277 // HasOrganization returns a boolean if a field has been set. 278 func (o *PipelineCollection) HasOrganization() bool { 279 if o != nil && !IsNil(o.Organization) { 280 return true 281 } 282 283 return false 284 } 285 286 // SetOrganization gets a reference to the given string and assigns it to the Organization field. 287 func (o *PipelineCollection) SetOrganization(v string) { 288 o.Organization = &v 289 } 290 291 func (o PipelineCollection) MarshalJSON() ([]byte, error) { 292 toSerialize, err := o.ToMap() 293 if err != nil { 294 return []byte{}, err 295 } 296 return json.Marshal(toSerialize) 297 } 298 299 func (o PipelineCollection) ToMap() (map[string]interface{}, error) { 300 toSerialize := map[string]interface{}{} 301 if !IsNil(o.Id) { 302 toSerialize["id"] = o.Id 303 } 304 if !IsNil(o.Description) { 305 toSerialize["description"] = o.Description 306 } 307 if !IsNil(o.Status) { 308 toSerialize["status"] = o.Status 309 } 310 if o.Environment.IsSet() { 311 toSerialize["environment"] = o.Environment.Get() 312 } 313 if !IsNil(o.Event) { 314 toSerialize["event"] = o.Event 315 } 316 if !IsNil(o.WebUrl) { 317 toSerialize["webUrl"] = o.WebUrl 318 } 319 if !IsNil(o.Organization) { 320 toSerialize["organization"] = o.Organization 321 } 322 return toSerialize, nil 323 } 324 325 type NullablePipelineCollection struct { 326 value *PipelineCollection 327 isSet bool 328 } 329 330 func (v NullablePipelineCollection) Get() *PipelineCollection { 331 return v.value 332 } 333 334 func (v *NullablePipelineCollection) Set(val *PipelineCollection) { 335 v.value = val 336 v.isSet = true 337 } 338 339 func (v NullablePipelineCollection) IsSet() bool { 340 return v.isSet 341 } 342 343 func (v *NullablePipelineCollection) Unset() { 344 v.value = nil 345 v.isSet = false 346 } 347 348 func NewNullablePipelineCollection(val *PipelineCollection) *NullablePipelineCollection { 349 return &NullablePipelineCollection{value: val, isSet: true} 350 } 351 352 func (v NullablePipelineCollection) MarshalJSON() ([]byte, error) { 353 return json.Marshal(v.value) 354 } 355 356 func (v *NullablePipelineCollection) UnmarshalJSON(src []byte) error { 357 v.isSet = true 358 return json.Unmarshal(src, &v.value) 359 }