bunnyshell.com/sdk@v0.16.0/model_organization_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 OrganizationCollection type satisfies the MappedNullable interface at compile time 19 var _ MappedNullable = &OrganizationCollection{} 20 21 // OrganizationCollection An organization holds multiple projects and all the integrations used by environments 22 type OrganizationCollection struct { 23 // Organization identifier. 24 Id *string `json:"id,omitempty"` 25 // Organization name as defined in Bunnyshell UI. 26 Name *string `json:"name,omitempty"` 27 // Organization timezone as defined in Bunnyshell UI. 28 Timezone *string `json:"timezone,omitempty"` 29 } 30 31 // NewOrganizationCollection instantiates a new OrganizationCollection object 32 // This constructor will assign default values to properties that have it defined, 33 // and makes sure properties required by API are set, but the set of arguments 34 // will change when the set of required properties is changed 35 func NewOrganizationCollection() *OrganizationCollection { 36 this := OrganizationCollection{} 37 return &this 38 } 39 40 // NewOrganizationCollectionWithDefaults instantiates a new OrganizationCollection object 41 // This constructor will only assign default values to properties that have it defined, 42 // but it doesn't guarantee that properties required by API are set 43 func NewOrganizationCollectionWithDefaults() *OrganizationCollection { 44 this := OrganizationCollection{} 45 return &this 46 } 47 48 // GetId returns the Id field value if set, zero value otherwise. 49 func (o *OrganizationCollection) GetId() string { 50 if o == nil || IsNil(o.Id) { 51 var ret string 52 return ret 53 } 54 return *o.Id 55 } 56 57 // GetIdOk returns a tuple with the Id field value if set, nil otherwise 58 // and a boolean to check if the value has been set. 59 func (o *OrganizationCollection) GetIdOk() (*string, bool) { 60 if o == nil || IsNil(o.Id) { 61 return nil, false 62 } 63 return o.Id, true 64 } 65 66 // HasId returns a boolean if a field has been set. 67 func (o *OrganizationCollection) HasId() bool { 68 if o != nil && !IsNil(o.Id) { 69 return true 70 } 71 72 return false 73 } 74 75 // SetId gets a reference to the given string and assigns it to the Id field. 76 func (o *OrganizationCollection) SetId(v string) { 77 o.Id = &v 78 } 79 80 // GetName returns the Name field value if set, zero value otherwise. 81 func (o *OrganizationCollection) GetName() string { 82 if o == nil || IsNil(o.Name) { 83 var ret string 84 return ret 85 } 86 return *o.Name 87 } 88 89 // GetNameOk returns a tuple with the Name field value if set, nil otherwise 90 // and a boolean to check if the value has been set. 91 func (o *OrganizationCollection) GetNameOk() (*string, bool) { 92 if o == nil || IsNil(o.Name) { 93 return nil, false 94 } 95 return o.Name, true 96 } 97 98 // HasName returns a boolean if a field has been set. 99 func (o *OrganizationCollection) HasName() bool { 100 if o != nil && !IsNil(o.Name) { 101 return true 102 } 103 104 return false 105 } 106 107 // SetName gets a reference to the given string and assigns it to the Name field. 108 func (o *OrganizationCollection) SetName(v string) { 109 o.Name = &v 110 } 111 112 // GetTimezone returns the Timezone field value if set, zero value otherwise. 113 func (o *OrganizationCollection) GetTimezone() string { 114 if o == nil || IsNil(o.Timezone) { 115 var ret string 116 return ret 117 } 118 return *o.Timezone 119 } 120 121 // GetTimezoneOk returns a tuple with the Timezone field value if set, nil otherwise 122 // and a boolean to check if the value has been set. 123 func (o *OrganizationCollection) GetTimezoneOk() (*string, bool) { 124 if o == nil || IsNil(o.Timezone) { 125 return nil, false 126 } 127 return o.Timezone, true 128 } 129 130 // HasTimezone returns a boolean if a field has been set. 131 func (o *OrganizationCollection) HasTimezone() bool { 132 if o != nil && !IsNil(o.Timezone) { 133 return true 134 } 135 136 return false 137 } 138 139 // SetTimezone gets a reference to the given string and assigns it to the Timezone field. 140 func (o *OrganizationCollection) SetTimezone(v string) { 141 o.Timezone = &v 142 } 143 144 func (o OrganizationCollection) MarshalJSON() ([]byte, error) { 145 toSerialize, err := o.ToMap() 146 if err != nil { 147 return []byte{}, err 148 } 149 return json.Marshal(toSerialize) 150 } 151 152 func (o OrganizationCollection) ToMap() (map[string]interface{}, error) { 153 toSerialize := map[string]interface{}{} 154 if !IsNil(o.Id) { 155 toSerialize["id"] = o.Id 156 } 157 if !IsNil(o.Name) { 158 toSerialize["name"] = o.Name 159 } 160 if !IsNil(o.Timezone) { 161 toSerialize["timezone"] = o.Timezone 162 } 163 return toSerialize, nil 164 } 165 166 type NullableOrganizationCollection struct { 167 value *OrganizationCollection 168 isSet bool 169 } 170 171 func (v NullableOrganizationCollection) Get() *OrganizationCollection { 172 return v.value 173 } 174 175 func (v *NullableOrganizationCollection) Set(val *OrganizationCollection) { 176 v.value = val 177 v.isSet = true 178 } 179 180 func (v NullableOrganizationCollection) IsSet() bool { 181 return v.isSet 182 } 183 184 func (v *NullableOrganizationCollection) Unset() { 185 v.value = nil 186 v.isSet = false 187 } 188 189 func NewNullableOrganizationCollection(val *OrganizationCollection) *NullableOrganizationCollection { 190 return &NullableOrganizationCollection{value: val, isSet: true} 191 } 192 193 func (v NullableOrganizationCollection) MarshalJSON() ([]byte, error) { 194 return json.Marshal(v.value) 195 } 196 197 func (v *NullableOrganizationCollection) UnmarshalJSON(src []byte) error { 198 v.isSet = true 199 return json.Unmarshal(src, &v.value) 200 }