/*
1Backend

AI-native microservices platform.

API version: 0.8.2
Contact: sales@singulatron.com
*/

// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

package openapi

import (
	"encoding/json"
)

// checks if the UserSvcListOrganizationsResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UserSvcListOrganizationsResponse{}

// UserSvcListOrganizationsResponse struct for UserSvcListOrganizationsResponse
type UserSvcListOrganizationsResponse struct {
	Organizations []UserSvcOrganization `json:"organizations,omitempty"`
}

// NewUserSvcListOrganizationsResponse instantiates a new UserSvcListOrganizationsResponse object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewUserSvcListOrganizationsResponse() *UserSvcListOrganizationsResponse {
	this := UserSvcListOrganizationsResponse{}
	return &this
}

// NewUserSvcListOrganizationsResponseWithDefaults instantiates a new UserSvcListOrganizationsResponse object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewUserSvcListOrganizationsResponseWithDefaults() *UserSvcListOrganizationsResponse {
	this := UserSvcListOrganizationsResponse{}
	return &this
}

// GetOrganizations returns the Organizations field value if set, zero value otherwise.
func (o *UserSvcListOrganizationsResponse) GetOrganizations() []UserSvcOrganization {
	if o == nil || IsNil(o.Organizations) {
		var ret []UserSvcOrganization
		return ret
	}
	return o.Organizations
}

// GetOrganizationsOk returns a tuple with the Organizations field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UserSvcListOrganizationsResponse) GetOrganizationsOk() ([]UserSvcOrganization, bool) {
	if o == nil || IsNil(o.Organizations) {
		return nil, false
	}
	return o.Organizations, true
}

// HasOrganizations returns a boolean if a field has been set.
func (o *UserSvcListOrganizationsResponse) HasOrganizations() bool {
	if o != nil && !IsNil(o.Organizations) {
		return true
	}

	return false
}

// SetOrganizations gets a reference to the given []UserSvcOrganization and assigns it to the Organizations field.
func (o *UserSvcListOrganizationsResponse) SetOrganizations(v []UserSvcOrganization) {
	o.Organizations = v
}

func (o UserSvcListOrganizationsResponse) MarshalJSON() ([]byte, error) {
	toSerialize,err := o.ToMap()
	if err != nil {
		return []byte{}, err
	}
	return json.Marshal(toSerialize)
}

func (o UserSvcListOrganizationsResponse) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Organizations) {
		toSerialize["organizations"] = o.Organizations
	}
	return toSerialize, nil
}

type NullableUserSvcListOrganizationsResponse struct {
	value *UserSvcListOrganizationsResponse
	isSet bool
}

func (v NullableUserSvcListOrganizationsResponse) Get() *UserSvcListOrganizationsResponse {
	return v.value
}

func (v *NullableUserSvcListOrganizationsResponse) Set(val *UserSvcListOrganizationsResponse) {
	v.value = val
	v.isSet = true
}

func (v NullableUserSvcListOrganizationsResponse) IsSet() bool {
	return v.isSet
}

func (v *NullableUserSvcListOrganizationsResponse) Unset() {
	v.value = nil
	v.isSet = false
}

func NewNullableUserSvcListOrganizationsResponse(val *UserSvcListOrganizationsResponse) *NullableUserSvcListOrganizationsResponse {
	return &NullableUserSvcListOrganizationsResponse{value: val, isSet: true}
}

func (v NullableUserSvcListOrganizationsResponse) MarshalJSON() ([]byte, error) {
	return json.Marshal(v.value)
}

func (v *NullableUserSvcListOrganizationsResponse) UnmarshalJSON(src []byte) error {
	v.isSet = true
	return json.Unmarshal(src, &v.value)
}


