/*
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 UserSvcListOrganizationsRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UserSvcListOrganizationsRequest{}

// UserSvcListOrganizationsRequest struct for UserSvcListOrganizationsRequest
type UserSvcListOrganizationsRequest struct {
	// Organizations by default come back ordered desc by `createdAt` field.
	AfterTime *string `json:"afterTime,omitempty"`
	Ids []string `json:"ids,omitempty"`
	Limit *int32 `json:"limit,omitempty"`
}

// NewUserSvcListOrganizationsRequest instantiates a new UserSvcListOrganizationsRequest 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 NewUserSvcListOrganizationsRequest() *UserSvcListOrganizationsRequest {
	this := UserSvcListOrganizationsRequest{}
	return &this
}

// NewUserSvcListOrganizationsRequestWithDefaults instantiates a new UserSvcListOrganizationsRequest 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 NewUserSvcListOrganizationsRequestWithDefaults() *UserSvcListOrganizationsRequest {
	this := UserSvcListOrganizationsRequest{}
	return &this
}

// GetAfterTime returns the AfterTime field value if set, zero value otherwise.
func (o *UserSvcListOrganizationsRequest) GetAfterTime() string {
	if o == nil || IsNil(o.AfterTime) {
		var ret string
		return ret
	}
	return *o.AfterTime
}

// GetAfterTimeOk returns a tuple with the AfterTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UserSvcListOrganizationsRequest) GetAfterTimeOk() (*string, bool) {
	if o == nil || IsNil(o.AfterTime) {
		return nil, false
	}
	return o.AfterTime, true
}

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

	return false
}

// SetAfterTime gets a reference to the given string and assigns it to the AfterTime field.
func (o *UserSvcListOrganizationsRequest) SetAfterTime(v string) {
	o.AfterTime = &v
}

// GetIds returns the Ids field value if set, zero value otherwise.
func (o *UserSvcListOrganizationsRequest) GetIds() []string {
	if o == nil || IsNil(o.Ids) {
		var ret []string
		return ret
	}
	return o.Ids
}

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

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

	return false
}

// SetIds gets a reference to the given []string and assigns it to the Ids field.
func (o *UserSvcListOrganizationsRequest) SetIds(v []string) {
	o.Ids = v
}

// GetLimit returns the Limit field value if set, zero value otherwise.
func (o *UserSvcListOrganizationsRequest) GetLimit() int32 {
	if o == nil || IsNil(o.Limit) {
		var ret int32
		return ret
	}
	return *o.Limit
}

// GetLimitOk returns a tuple with the Limit field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UserSvcListOrganizationsRequest) GetLimitOk() (*int32, bool) {
	if o == nil || IsNil(o.Limit) {
		return nil, false
	}
	return o.Limit, true
}

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

	return false
}

// SetLimit gets a reference to the given int32 and assigns it to the Limit field.
func (o *UserSvcListOrganizationsRequest) SetLimit(v int32) {
	o.Limit = &v
}

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

func (o UserSvcListOrganizationsRequest) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.AfterTime) {
		toSerialize["afterTime"] = o.AfterTime
	}
	if !IsNil(o.Ids) {
		toSerialize["ids"] = o.Ids
	}
	if !IsNil(o.Limit) {
		toSerialize["limit"] = o.Limit
	}
	return toSerialize, nil
}

type NullableUserSvcListOrganizationsRequest struct {
	value *UserSvcListOrganizationsRequest
	isSet bool
}

func (v NullableUserSvcListOrganizationsRequest) Get() *UserSvcListOrganizationsRequest {
	return v.value
}

func (v *NullableUserSvcListOrganizationsRequest) Set(val *UserSvcListOrganizationsRequest) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableUserSvcListOrganizationsRequest(val *UserSvcListOrganizationsRequest) *NullableUserSvcListOrganizationsRequest {
	return &NullableUserSvcListOrganizationsRequest{value: val, isSet: true}
}

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

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


