/*
DM OpenAPI DOC

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

API version: 6.0.0
*/

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

package dm

import (
	"encoding/json"
)

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

// DisableRelayRequest action to stop a relay request
type DisableRelayRequest struct {
	// worker name list
	WorkerNameList []string `json:"worker_name_list,omitempty"`
}

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

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

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

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

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

	return false
}

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

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

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

type NullableDisableRelayRequest struct {
	value *DisableRelayRequest
	isSet bool
}

func (v NullableDisableRelayRequest) Get() *DisableRelayRequest {
	return v.value
}

func (v *NullableDisableRelayRequest) Set(val *DisableRelayRequest) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableDisableRelayRequest(val *DisableRelayRequest) *NullableDisableRelayRequest {
	return &NullableDisableRelayRequest{value: val, isSet: true}
}

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

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