/*
gravity

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

API version: 0.28.1
*/

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

package api

import (
	"encoding/json"
)

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

// EtcdAPIMembersOutput struct for EtcdAPIMembersOutput
type EtcdAPIMembersOutput struct {
	Members []EtcdAPIMember `json:"members,omitempty"`
}

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

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

// GetMembers returns the Members field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *EtcdAPIMembersOutput) GetMembers() []EtcdAPIMember {
	if o == nil {
		var ret []EtcdAPIMember
		return ret
	}
	return o.Members
}

// GetMembersOk returns a tuple with the Members field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *EtcdAPIMembersOutput) GetMembersOk() ([]EtcdAPIMember, bool) {
	if o == nil || IsNil(o.Members) {
		return nil, false
	}
	return o.Members, true
}

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

	return false
}

// SetMembers gets a reference to the given []EtcdAPIMember and assigns it to the Members field.
func (o *EtcdAPIMembersOutput) SetMembers(v []EtcdAPIMember) {
	o.Members = v
}

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

func (o EtcdAPIMembersOutput) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if o.Members != nil {
		toSerialize["members"] = o.Members
	}
	return toSerialize, nil
}

type NullableEtcdAPIMembersOutput struct {
	value *EtcdAPIMembersOutput
	isSet bool
}

func (v NullableEtcdAPIMembersOutput) Get() *EtcdAPIMembersOutput {
	return v.value
}

func (v *NullableEtcdAPIMembersOutput) Set(val *EtcdAPIMembersOutput) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableEtcdAPIMembersOutput(val *EtcdAPIMembersOutput) *NullableEtcdAPIMembersOutput {
	return &NullableEtcdAPIMembersOutput{value: val, isSet: true}
}

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

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