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

// UserSvcListEnrollsRequest struct for UserSvcListEnrollsRequest
type UserSvcListEnrollsRequest struct {
	ContactId *string `json:"contactId,omitempty"`
	Role *string `json:"role,omitempty"`
	UserId *string `json:"userId,omitempty"`
}

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

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

// GetContactId returns the ContactId field value if set, zero value otherwise.
func (o *UserSvcListEnrollsRequest) 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 *UserSvcListEnrollsRequest) 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 *UserSvcListEnrollsRequest) 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 *UserSvcListEnrollsRequest) SetContactId(v string) {
	o.ContactId = &v
}

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

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

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

	return false
}

// SetRole gets a reference to the given string and assigns it to the Role field.
func (o *UserSvcListEnrollsRequest) SetRole(v string) {
	o.Role = &v
}

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

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

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

	return false
}

// SetUserId gets a reference to the given string and assigns it to the UserId field.
func (o *UserSvcListEnrollsRequest) SetUserId(v string) {
	o.UserId = &v
}

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

func (o UserSvcListEnrollsRequest) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.ContactId) {
		toSerialize["contactId"] = o.ContactId
	}
	if !IsNil(o.Role) {
		toSerialize["role"] = o.Role
	}
	if !IsNil(o.UserId) {
		toSerialize["userId"] = o.UserId
	}
	return toSerialize, nil
}

type NullableUserSvcListEnrollsRequest struct {
	value *UserSvcListEnrollsRequest
	isSet bool
}

func (v NullableUserSvcListEnrollsRequest) Get() *UserSvcListEnrollsRequest {
	return v.value
}

func (v *NullableUserSvcListEnrollsRequest) Set(val *UserSvcListEnrollsRequest) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableUserSvcListEnrollsRequest(val *UserSvcListEnrollsRequest) *NullableUserSvcListEnrollsRequest {
	return &NullableUserSvcListEnrollsRequest{value: val, isSet: true}
}

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

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


