bunnyshell.com/sdk@v0.16.0/model_registry_integration_item.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 RegistryIntegrationItem type satisfies the MappedNullable interface at compile time 19 var _ MappedNullable = &RegistryIntegrationItem{} 20 21 // RegistryIntegrationItem A Registry integration stores connection information for a Container registry. 22 type RegistryIntegrationItem struct { 23 // Registry integration identifier. 24 Id *string `json:"id,omitempty"` 25 // Registry integration name. 26 Name *string `json:"name,omitempty"` 27 // Registry integration provider. 28 ProviderName *string `json:"providerName,omitempty"` 29 // Registry integration status. 30 Status *string `json:"status,omitempty"` 31 // Organization identifier. 32 Organization *string `json:"organization,omitempty"` 33 } 34 35 // NewRegistryIntegrationItem instantiates a new RegistryIntegrationItem object 36 // This constructor will assign default values to properties that have it defined, 37 // and makes sure properties required by API are set, but the set of arguments 38 // will change when the set of required properties is changed 39 func NewRegistryIntegrationItem() *RegistryIntegrationItem { 40 this := RegistryIntegrationItem{} 41 return &this 42 } 43 44 // NewRegistryIntegrationItemWithDefaults instantiates a new RegistryIntegrationItem object 45 // This constructor will only assign default values to properties that have it defined, 46 // but it doesn't guarantee that properties required by API are set 47 func NewRegistryIntegrationItemWithDefaults() *RegistryIntegrationItem { 48 this := RegistryIntegrationItem{} 49 return &this 50 } 51 52 // GetId returns the Id field value if set, zero value otherwise. 53 func (o *RegistryIntegrationItem) GetId() string { 54 if o == nil || IsNil(o.Id) { 55 var ret string 56 return ret 57 } 58 return *o.Id 59 } 60 61 // GetIdOk returns a tuple with the Id field value if set, nil otherwise 62 // and a boolean to check if the value has been set. 63 func (o *RegistryIntegrationItem) GetIdOk() (*string, bool) { 64 if o == nil || IsNil(o.Id) { 65 return nil, false 66 } 67 return o.Id, true 68 } 69 70 // HasId returns a boolean if a field has been set. 71 func (o *RegistryIntegrationItem) HasId() bool { 72 if o != nil && !IsNil(o.Id) { 73 return true 74 } 75 76 return false 77 } 78 79 // SetId gets a reference to the given string and assigns it to the Id field. 80 func (o *RegistryIntegrationItem) SetId(v string) { 81 o.Id = &v 82 } 83 84 // GetName returns the Name field value if set, zero value otherwise. 85 func (o *RegistryIntegrationItem) GetName() string { 86 if o == nil || IsNil(o.Name) { 87 var ret string 88 return ret 89 } 90 return *o.Name 91 } 92 93 // GetNameOk returns a tuple with the Name field value if set, nil otherwise 94 // and a boolean to check if the value has been set. 95 func (o *RegistryIntegrationItem) GetNameOk() (*string, bool) { 96 if o == nil || IsNil(o.Name) { 97 return nil, false 98 } 99 return o.Name, true 100 } 101 102 // HasName returns a boolean if a field has been set. 103 func (o *RegistryIntegrationItem) HasName() bool { 104 if o != nil && !IsNil(o.Name) { 105 return true 106 } 107 108 return false 109 } 110 111 // SetName gets a reference to the given string and assigns it to the Name field. 112 func (o *RegistryIntegrationItem) SetName(v string) { 113 o.Name = &v 114 } 115 116 // GetProviderName returns the ProviderName field value if set, zero value otherwise. 117 func (o *RegistryIntegrationItem) GetProviderName() string { 118 if o == nil || IsNil(o.ProviderName) { 119 var ret string 120 return ret 121 } 122 return *o.ProviderName 123 } 124 125 // GetProviderNameOk returns a tuple with the ProviderName field value if set, nil otherwise 126 // and a boolean to check if the value has been set. 127 func (o *RegistryIntegrationItem) GetProviderNameOk() (*string, bool) { 128 if o == nil || IsNil(o.ProviderName) { 129 return nil, false 130 } 131 return o.ProviderName, true 132 } 133 134 // HasProviderName returns a boolean if a field has been set. 135 func (o *RegistryIntegrationItem) HasProviderName() bool { 136 if o != nil && !IsNil(o.ProviderName) { 137 return true 138 } 139 140 return false 141 } 142 143 // SetProviderName gets a reference to the given string and assigns it to the ProviderName field. 144 func (o *RegistryIntegrationItem) SetProviderName(v string) { 145 o.ProviderName = &v 146 } 147 148 // GetStatus returns the Status field value if set, zero value otherwise. 149 func (o *RegistryIntegrationItem) GetStatus() string { 150 if o == nil || IsNil(o.Status) { 151 var ret string 152 return ret 153 } 154 return *o.Status 155 } 156 157 // GetStatusOk returns a tuple with the Status field value if set, nil otherwise 158 // and a boolean to check if the value has been set. 159 func (o *RegistryIntegrationItem) GetStatusOk() (*string, bool) { 160 if o == nil || IsNil(o.Status) { 161 return nil, false 162 } 163 return o.Status, true 164 } 165 166 // HasStatus returns a boolean if a field has been set. 167 func (o *RegistryIntegrationItem) HasStatus() bool { 168 if o != nil && !IsNil(o.Status) { 169 return true 170 } 171 172 return false 173 } 174 175 // SetStatus gets a reference to the given string and assigns it to the Status field. 176 func (o *RegistryIntegrationItem) SetStatus(v string) { 177 o.Status = &v 178 } 179 180 // GetOrganization returns the Organization field value if set, zero value otherwise. 181 func (o *RegistryIntegrationItem) GetOrganization() string { 182 if o == nil || IsNil(o.Organization) { 183 var ret string 184 return ret 185 } 186 return *o.Organization 187 } 188 189 // GetOrganizationOk returns a tuple with the Organization field value if set, nil otherwise 190 // and a boolean to check if the value has been set. 191 func (o *RegistryIntegrationItem) GetOrganizationOk() (*string, bool) { 192 if o == nil || IsNil(o.Organization) { 193 return nil, false 194 } 195 return o.Organization, true 196 } 197 198 // HasOrganization returns a boolean if a field has been set. 199 func (o *RegistryIntegrationItem) HasOrganization() bool { 200 if o != nil && !IsNil(o.Organization) { 201 return true 202 } 203 204 return false 205 } 206 207 // SetOrganization gets a reference to the given string and assigns it to the Organization field. 208 func (o *RegistryIntegrationItem) SetOrganization(v string) { 209 o.Organization = &v 210 } 211 212 func (o RegistryIntegrationItem) MarshalJSON() ([]byte, error) { 213 toSerialize, err := o.ToMap() 214 if err != nil { 215 return []byte{}, err 216 } 217 return json.Marshal(toSerialize) 218 } 219 220 func (o RegistryIntegrationItem) ToMap() (map[string]interface{}, error) { 221 toSerialize := map[string]interface{}{} 222 if !IsNil(o.Id) { 223 toSerialize["id"] = o.Id 224 } 225 if !IsNil(o.Name) { 226 toSerialize["name"] = o.Name 227 } 228 if !IsNil(o.ProviderName) { 229 toSerialize["providerName"] = o.ProviderName 230 } 231 if !IsNil(o.Status) { 232 toSerialize["status"] = o.Status 233 } 234 if !IsNil(o.Organization) { 235 toSerialize["organization"] = o.Organization 236 } 237 return toSerialize, nil 238 } 239 240 type NullableRegistryIntegrationItem struct { 241 value *RegistryIntegrationItem 242 isSet bool 243 } 244 245 func (v NullableRegistryIntegrationItem) Get() *RegistryIntegrationItem { 246 return v.value 247 } 248 249 func (v *NullableRegistryIntegrationItem) Set(val *RegistryIntegrationItem) { 250 v.value = val 251 v.isSet = true 252 } 253 254 func (v NullableRegistryIntegrationItem) IsSet() bool { 255 return v.isSet 256 } 257 258 func (v *NullableRegistryIntegrationItem) Unset() { 259 v.value = nil 260 v.isSet = false 261 } 262 263 func NewNullableRegistryIntegrationItem(val *RegistryIntegrationItem) *NullableRegistryIntegrationItem { 264 return &NullableRegistryIntegrationItem{value: val, isSet: true} 265 } 266 267 func (v NullableRegistryIntegrationItem) MarshalJSON() ([]byte, error) { 268 return json.Marshal(v.value) 269 } 270 271 func (v *NullableRegistryIntegrationItem) UnmarshalJSON(src []byte) error { 272 v.isSet = true 273 return json.Unmarshal(src, &v.value) 274 }