bunnyshell.com/sdk@v0.16.0/model_paginated_kubernetes_integration_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 PaginatedKubernetesIntegrationCollection type satisfies the MappedNullable interface at compile time 19 var _ MappedNullable = &PaginatedKubernetesIntegrationCollection{} 20 21 // PaginatedKubernetesIntegrationCollection Paginated result 22 type PaginatedKubernetesIntegrationCollection struct { 23 Links *PaginatedLinks `json:"_links,omitempty"` 24 TotalItems *int32 `json:"totalItems,omitempty"` 25 Page *int32 `json:"page,omitempty"` 26 ItemsPerPage *int32 `json:"itemsPerPage,omitempty"` 27 Embedded *EmbeddedKubernetesIntegrationCollection `json:"_embedded,omitempty"` 28 } 29 30 // NewPaginatedKubernetesIntegrationCollection instantiates a new PaginatedKubernetesIntegrationCollection object 31 // This constructor will assign default values to properties that have it defined, 32 // and makes sure properties required by API are set, but the set of arguments 33 // will change when the set of required properties is changed 34 func NewPaginatedKubernetesIntegrationCollection() *PaginatedKubernetesIntegrationCollection { 35 this := PaginatedKubernetesIntegrationCollection{} 36 return &this 37 } 38 39 // NewPaginatedKubernetesIntegrationCollectionWithDefaults instantiates a new PaginatedKubernetesIntegrationCollection 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 NewPaginatedKubernetesIntegrationCollectionWithDefaults() *PaginatedKubernetesIntegrationCollection { 43 this := PaginatedKubernetesIntegrationCollection{} 44 return &this 45 } 46 47 // GetLinks returns the Links field value if set, zero value otherwise. 48 func (o *PaginatedKubernetesIntegrationCollection) GetLinks() PaginatedLinks { 49 if o == nil || IsNil(o.Links) { 50 var ret PaginatedLinks 51 return ret 52 } 53 return *o.Links 54 } 55 56 // GetLinksOk returns a tuple with the Links field value if set, nil otherwise 57 // and a boolean to check if the value has been set. 58 func (o *PaginatedKubernetesIntegrationCollection) GetLinksOk() (*PaginatedLinks, bool) { 59 if o == nil || IsNil(o.Links) { 60 return nil, false 61 } 62 return o.Links, true 63 } 64 65 // HasLinks returns a boolean if a field has been set. 66 func (o *PaginatedKubernetesIntegrationCollection) HasLinks() bool { 67 if o != nil && !IsNil(o.Links) { 68 return true 69 } 70 71 return false 72 } 73 74 // SetLinks gets a reference to the given PaginatedLinks and assigns it to the Links field. 75 func (o *PaginatedKubernetesIntegrationCollection) SetLinks(v PaginatedLinks) { 76 o.Links = &v 77 } 78 79 // GetTotalItems returns the TotalItems field value if set, zero value otherwise. 80 func (o *PaginatedKubernetesIntegrationCollection) GetTotalItems() int32 { 81 if o == nil || IsNil(o.TotalItems) { 82 var ret int32 83 return ret 84 } 85 return *o.TotalItems 86 } 87 88 // GetTotalItemsOk returns a tuple with the TotalItems field value if set, nil otherwise 89 // and a boolean to check if the value has been set. 90 func (o *PaginatedKubernetesIntegrationCollection) GetTotalItemsOk() (*int32, bool) { 91 if o == nil || IsNil(o.TotalItems) { 92 return nil, false 93 } 94 return o.TotalItems, true 95 } 96 97 // HasTotalItems returns a boolean if a field has been set. 98 func (o *PaginatedKubernetesIntegrationCollection) HasTotalItems() bool { 99 if o != nil && !IsNil(o.TotalItems) { 100 return true 101 } 102 103 return false 104 } 105 106 // SetTotalItems gets a reference to the given int32 and assigns it to the TotalItems field. 107 func (o *PaginatedKubernetesIntegrationCollection) SetTotalItems(v int32) { 108 o.TotalItems = &v 109 } 110 111 // GetPage returns the Page field value if set, zero value otherwise. 112 func (o *PaginatedKubernetesIntegrationCollection) GetPage() int32 { 113 if o == nil || IsNil(o.Page) { 114 var ret int32 115 return ret 116 } 117 return *o.Page 118 } 119 120 // GetPageOk returns a tuple with the Page field value if set, nil otherwise 121 // and a boolean to check if the value has been set. 122 func (o *PaginatedKubernetesIntegrationCollection) GetPageOk() (*int32, bool) { 123 if o == nil || IsNil(o.Page) { 124 return nil, false 125 } 126 return o.Page, true 127 } 128 129 // HasPage returns a boolean if a field has been set. 130 func (o *PaginatedKubernetesIntegrationCollection) HasPage() bool { 131 if o != nil && !IsNil(o.Page) { 132 return true 133 } 134 135 return false 136 } 137 138 // SetPage gets a reference to the given int32 and assigns it to the Page field. 139 func (o *PaginatedKubernetesIntegrationCollection) SetPage(v int32) { 140 o.Page = &v 141 } 142 143 // GetItemsPerPage returns the ItemsPerPage field value if set, zero value otherwise. 144 func (o *PaginatedKubernetesIntegrationCollection) GetItemsPerPage() int32 { 145 if o == nil || IsNil(o.ItemsPerPage) { 146 var ret int32 147 return ret 148 } 149 return *o.ItemsPerPage 150 } 151 152 // GetItemsPerPageOk returns a tuple with the ItemsPerPage field value if set, nil otherwise 153 // and a boolean to check if the value has been set. 154 func (o *PaginatedKubernetesIntegrationCollection) GetItemsPerPageOk() (*int32, bool) { 155 if o == nil || IsNil(o.ItemsPerPage) { 156 return nil, false 157 } 158 return o.ItemsPerPage, true 159 } 160 161 // HasItemsPerPage returns a boolean if a field has been set. 162 func (o *PaginatedKubernetesIntegrationCollection) HasItemsPerPage() bool { 163 if o != nil && !IsNil(o.ItemsPerPage) { 164 return true 165 } 166 167 return false 168 } 169 170 // SetItemsPerPage gets a reference to the given int32 and assigns it to the ItemsPerPage field. 171 func (o *PaginatedKubernetesIntegrationCollection) SetItemsPerPage(v int32) { 172 o.ItemsPerPage = &v 173 } 174 175 // GetEmbedded returns the Embedded field value if set, zero value otherwise. 176 func (o *PaginatedKubernetesIntegrationCollection) GetEmbedded() EmbeddedKubernetesIntegrationCollection { 177 if o == nil || IsNil(o.Embedded) { 178 var ret EmbeddedKubernetesIntegrationCollection 179 return ret 180 } 181 return *o.Embedded 182 } 183 184 // GetEmbeddedOk returns a tuple with the Embedded field value if set, nil otherwise 185 // and a boolean to check if the value has been set. 186 func (o *PaginatedKubernetesIntegrationCollection) GetEmbeddedOk() (*EmbeddedKubernetesIntegrationCollection, bool) { 187 if o == nil || IsNil(o.Embedded) { 188 return nil, false 189 } 190 return o.Embedded, true 191 } 192 193 // HasEmbedded returns a boolean if a field has been set. 194 func (o *PaginatedKubernetesIntegrationCollection) HasEmbedded() bool { 195 if o != nil && !IsNil(o.Embedded) { 196 return true 197 } 198 199 return false 200 } 201 202 // SetEmbedded gets a reference to the given EmbeddedKubernetesIntegrationCollection and assigns it to the Embedded field. 203 func (o *PaginatedKubernetesIntegrationCollection) SetEmbedded(v EmbeddedKubernetesIntegrationCollection) { 204 o.Embedded = &v 205 } 206 207 func (o PaginatedKubernetesIntegrationCollection) MarshalJSON() ([]byte, error) { 208 toSerialize, err := o.ToMap() 209 if err != nil { 210 return []byte{}, err 211 } 212 return json.Marshal(toSerialize) 213 } 214 215 func (o PaginatedKubernetesIntegrationCollection) ToMap() (map[string]interface{}, error) { 216 toSerialize := map[string]interface{}{} 217 if !IsNil(o.Links) { 218 toSerialize["_links"] = o.Links 219 } 220 if !IsNil(o.TotalItems) { 221 toSerialize["totalItems"] = o.TotalItems 222 } 223 if !IsNil(o.Page) { 224 toSerialize["page"] = o.Page 225 } 226 if !IsNil(o.ItemsPerPage) { 227 toSerialize["itemsPerPage"] = o.ItemsPerPage 228 } 229 if !IsNil(o.Embedded) { 230 toSerialize["_embedded"] = o.Embedded 231 } 232 return toSerialize, nil 233 } 234 235 type NullablePaginatedKubernetesIntegrationCollection struct { 236 value *PaginatedKubernetesIntegrationCollection 237 isSet bool 238 } 239 240 func (v NullablePaginatedKubernetesIntegrationCollection) Get() *PaginatedKubernetesIntegrationCollection { 241 return v.value 242 } 243 244 func (v *NullablePaginatedKubernetesIntegrationCollection) Set(val *PaginatedKubernetesIntegrationCollection) { 245 v.value = val 246 v.isSet = true 247 } 248 249 func (v NullablePaginatedKubernetesIntegrationCollection) IsSet() bool { 250 return v.isSet 251 } 252 253 func (v *NullablePaginatedKubernetesIntegrationCollection) Unset() { 254 v.value = nil 255 v.isSet = false 256 } 257 258 func NewNullablePaginatedKubernetesIntegrationCollection(val *PaginatedKubernetesIntegrationCollection) *NullablePaginatedKubernetesIntegrationCollection { 259 return &NullablePaginatedKubernetesIntegrationCollection{value: val, isSet: true} 260 } 261 262 func (v NullablePaginatedKubernetesIntegrationCollection) MarshalJSON() ([]byte, error) { 263 return json.Marshal(v.value) 264 } 265 266 func (v *NullablePaginatedKubernetesIntegrationCollection) UnmarshalJSON(src []byte) error { 267 v.isSet = true 268 return json.Unmarshal(src, &v.value) 269 }