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

// UserSvcListUsersRequest struct for UserSvcListUsersRequest
type UserSvcListUsersRequest struct {
	// AfterTime is a time in RFC3339 format. It is used to paginate the results when the `orderByField` is set to `createdAt` or `updatedAt`. The results will be returned after this time.
	AfterTime *string `json:"afterTime,omitempty"`
	// ContactId is the id of the contact the user is associated with. Will return a user list with one element if set.
	ContactId *string `json:"contactId,omitempty"`
	// Count is a flag that indicates if the count of the users should be returned.
	Count *bool `json:"count,omitempty"`
	// Ids of the users to list.
	Ids []string `json:"ids,omitempty"`
	Limit *int32 `json:"limit,omitempty"`
	Order *UserSvcOrderDirection `json:"order,omitempty"`
	OrderBy *UserSvcListUsersOrderBy `json:"orderBy,omitempty"`
	// Search term used to find users. Returns users whose slug, username, or contact ID exactly matches the term.
	Search *string `json:"search,omitempty"`
}

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

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

// GetAfterTime returns the AfterTime field value if set, zero value otherwise.
func (o *UserSvcListUsersRequest) 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 *UserSvcListUsersRequest) 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 *UserSvcListUsersRequest) 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 *UserSvcListUsersRequest) SetAfterTime(v string) {
	o.AfterTime = &v
}

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

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

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

	return false
}

// SetContactId gets a reference to the given string and assigns it to the ContactId field.
func (o *UserSvcListUsersRequest) SetContactId(v string) {
	o.ContactId = &v
}

// GetCount returns the Count field value if set, zero value otherwise.
func (o *UserSvcListUsersRequest) GetCount() bool {
	if o == nil || IsNil(o.Count) {
		var ret bool
		return ret
	}
	return *o.Count
}

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

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

	return false
}

// SetCount gets a reference to the given bool and assigns it to the Count field.
func (o *UserSvcListUsersRequest) SetCount(v bool) {
	o.Count = &v
}

// GetIds returns the Ids field value if set, zero value otherwise.
func (o *UserSvcListUsersRequest) 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 *UserSvcListUsersRequest) 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 *UserSvcListUsersRequest) 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 *UserSvcListUsersRequest) SetIds(v []string) {
	o.Ids = v
}

// GetLimit returns the Limit field value if set, zero value otherwise.
func (o *UserSvcListUsersRequest) 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 *UserSvcListUsersRequest) 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 *UserSvcListUsersRequest) 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 *UserSvcListUsersRequest) SetLimit(v int32) {
	o.Limit = &v
}

// GetOrder returns the Order field value if set, zero value otherwise.
func (o *UserSvcListUsersRequest) GetOrder() UserSvcOrderDirection {
	if o == nil || IsNil(o.Order) {
		var ret UserSvcOrderDirection
		return ret
	}
	return *o.Order
}

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

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

	return false
}

// SetOrder gets a reference to the given UserSvcOrderDirection and assigns it to the Order field.
func (o *UserSvcListUsersRequest) SetOrder(v UserSvcOrderDirection) {
	o.Order = &v
}

// GetOrderBy returns the OrderBy field value if set, zero value otherwise.
func (o *UserSvcListUsersRequest) GetOrderBy() UserSvcListUsersOrderBy {
	if o == nil || IsNil(o.OrderBy) {
		var ret UserSvcListUsersOrderBy
		return ret
	}
	return *o.OrderBy
}

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

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

	return false
}

// SetOrderBy gets a reference to the given UserSvcListUsersOrderBy and assigns it to the OrderBy field.
func (o *UserSvcListUsersRequest) SetOrderBy(v UserSvcListUsersOrderBy) {
	o.OrderBy = &v
}

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

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

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

	return false
}

// SetSearch gets a reference to the given string and assigns it to the Search field.
func (o *UserSvcListUsersRequest) SetSearch(v string) {
	o.Search = &v
}

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

func (o UserSvcListUsersRequest) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.AfterTime) {
		toSerialize["afterTime"] = o.AfterTime
	}
	if !IsNil(o.ContactId) {
		toSerialize["contactId"] = o.ContactId
	}
	if !IsNil(o.Count) {
		toSerialize["count"] = o.Count
	}
	if !IsNil(o.Ids) {
		toSerialize["ids"] = o.Ids
	}
	if !IsNil(o.Limit) {
		toSerialize["limit"] = o.Limit
	}
	if !IsNil(o.Order) {
		toSerialize["order"] = o.Order
	}
	if !IsNil(o.OrderBy) {
		toSerialize["orderBy"] = o.OrderBy
	}
	if !IsNil(o.Search) {
		toSerialize["search"] = o.Search
	}
	return toSerialize, nil
}

type NullableUserSvcListUsersRequest struct {
	value *UserSvcListUsersRequest
	isSet bool
}

func (v NullableUserSvcListUsersRequest) Get() *UserSvcListUsersRequest {
	return v.value
}

func (v *NullableUserSvcListUsersRequest) Set(val *UserSvcListUsersRequest) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableUserSvcListUsersRequest(val *UserSvcListUsersRequest) *NullableUserSvcListUsersRequest {
	return &NullableUserSvcListUsersRequest{value: val, isSet: true}
}

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

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


