package intersight

import (
	"encoding/json"
)

type FcpoolPoolMemberAllOf struct {

	ClassId string `json:"ClassId"`

	ObjectType string `json:"ObjectType"`

	WwnId *string `json:"WwnId,omitempty"`
	AssignedToEntity *MoBaseMoRelationship `json:"AssignedToEntity,omitempty"`
	BlockHead *FcpoolFcBlockRelationship `json:"BlockHead,omitempty"`
	Peer *FcpoolLeaseRelationship `json:"Peer,omitempty"`
	Pool *FcpoolPoolRelationship `json:"Pool,omitempty"`
	AdditionalProperties map[string]interface{}
}

type _FcpoolPoolMemberAllOf FcpoolPoolMemberAllOf

func NewFcpoolPoolMemberAllOf(classId string, objectType string) *FcpoolPoolMemberAllOf {
	this := FcpoolPoolMemberAllOf{}
	this.ClassId = classId
	this.ObjectType = objectType
	return &this
}

func NewFcpoolPoolMemberAllOfWithDefaults() *FcpoolPoolMemberAllOf {
	this := FcpoolPoolMemberAllOf{}
	var classId string = "fcpool.PoolMember"
	this.ClassId = classId
	var objectType string = "fcpool.PoolMember"
	this.ObjectType = objectType
	return &this
}

func (o *FcpoolPoolMemberAllOf) GetClassId() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.ClassId
}

func (o *FcpoolPoolMemberAllOf) GetClassIdOk() (*string, bool) {
	if o == nil  {
		return nil, false
	}
	return &o.ClassId, true
}

func (o *FcpoolPoolMemberAllOf) SetClassId(v string) {
	o.ClassId = v
}

func (o *FcpoolPoolMemberAllOf) GetObjectType() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.ObjectType
}

func (o *FcpoolPoolMemberAllOf) GetObjectTypeOk() (*string, bool) {
	if o == nil  {
		return nil, false
	}
	return &o.ObjectType, true
}

func (o *FcpoolPoolMemberAllOf) SetObjectType(v string) {
	o.ObjectType = v
}

func (o *FcpoolPoolMemberAllOf) GetWwnId() string {
	if o == nil || o.WwnId == nil {
		var ret string
		return ret
	}
	return *o.WwnId
}

func (o *FcpoolPoolMemberAllOf) GetWwnIdOk() (*string, bool) {
	if o == nil || o.WwnId == nil {
		return nil, false
	}
	return o.WwnId, true
}

func (o *FcpoolPoolMemberAllOf) HasWwnId() bool {
	if o != nil && o.WwnId != nil {
		return true
	}

	return false
}

func (o *FcpoolPoolMemberAllOf) SetWwnId(v string) {
	o.WwnId = &v
}

func (o *FcpoolPoolMemberAllOf) GetAssignedToEntity() MoBaseMoRelationship {
	if o == nil || o.AssignedToEntity == nil {
		var ret MoBaseMoRelationship
		return ret
	}
	return *o.AssignedToEntity
}

func (o *FcpoolPoolMemberAllOf) GetAssignedToEntityOk() (*MoBaseMoRelationship, bool) {
	if o == nil || o.AssignedToEntity == nil {
		return nil, false
	}
	return o.AssignedToEntity, true
}

func (o *FcpoolPoolMemberAllOf) HasAssignedToEntity() bool {
	if o != nil && o.AssignedToEntity != nil {
		return true
	}

	return false
}

func (o *FcpoolPoolMemberAllOf) SetAssignedToEntity(v MoBaseMoRelationship) {
	o.AssignedToEntity = &v
}

func (o *FcpoolPoolMemberAllOf) GetBlockHead() FcpoolFcBlockRelationship {
	if o == nil || o.BlockHead == nil {
		var ret FcpoolFcBlockRelationship
		return ret
	}
	return *o.BlockHead
}

func (o *FcpoolPoolMemberAllOf) GetBlockHeadOk() (*FcpoolFcBlockRelationship, bool) {
	if o == nil || o.BlockHead == nil {
		return nil, false
	}
	return o.BlockHead, true
}

func (o *FcpoolPoolMemberAllOf) HasBlockHead() bool {
	if o != nil && o.BlockHead != nil {
		return true
	}

	return false
}

func (o *FcpoolPoolMemberAllOf) SetBlockHead(v FcpoolFcBlockRelationship) {
	o.BlockHead = &v
}

func (o *FcpoolPoolMemberAllOf) GetPeer() FcpoolLeaseRelationship {
	if o == nil || o.Peer == nil {
		var ret FcpoolLeaseRelationship
		return ret
	}
	return *o.Peer
}

func (o *FcpoolPoolMemberAllOf) GetPeerOk() (*FcpoolLeaseRelationship, bool) {
	if o == nil || o.Peer == nil {
		return nil, false
	}
	return o.Peer, true
}

func (o *FcpoolPoolMemberAllOf) HasPeer() bool {
	if o != nil && o.Peer != nil {
		return true
	}

	return false
}

func (o *FcpoolPoolMemberAllOf) SetPeer(v FcpoolLeaseRelationship) {
	o.Peer = &v
}

func (o *FcpoolPoolMemberAllOf) GetPool() FcpoolPoolRelationship {
	if o == nil || o.Pool == nil {
		var ret FcpoolPoolRelationship
		return ret
	}
	return *o.Pool
}

func (o *FcpoolPoolMemberAllOf) GetPoolOk() (*FcpoolPoolRelationship, bool) {
	if o == nil || o.Pool == nil {
		return nil, false
	}
	return o.Pool, true
}

func (o *FcpoolPoolMemberAllOf) HasPool() bool {
	if o != nil && o.Pool != nil {
		return true
	}

	return false
}

func (o *FcpoolPoolMemberAllOf) SetPool(v FcpoolPoolRelationship) {
	o.Pool = &v
}

func (o FcpoolPoolMemberAllOf) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if true {
		toSerialize["ClassId"] = o.ClassId
	}
	if true {
		toSerialize["ObjectType"] = o.ObjectType
	}
	if o.WwnId != nil {
		toSerialize["WwnId"] = o.WwnId
	}
	if o.AssignedToEntity != nil {
		toSerialize["AssignedToEntity"] = o.AssignedToEntity
	}
	if o.BlockHead != nil {
		toSerialize["BlockHead"] = o.BlockHead
	}
	if o.Peer != nil {
		toSerialize["Peer"] = o.Peer
	}
	if o.Pool != nil {
		toSerialize["Pool"] = o.Pool
	}

	for key, value := range o.AdditionalProperties {
		toSerialize[key] = value
	}

	return json.Marshal(toSerialize)
}

func (o *FcpoolPoolMemberAllOf) UnmarshalJSON(bytes []byte) (err error) {
	varFcpoolPoolMemberAllOf := _FcpoolPoolMemberAllOf{}

	if err = json.Unmarshal(bytes, &varFcpoolPoolMemberAllOf); err == nil {
		*o = FcpoolPoolMemberAllOf(varFcpoolPoolMemberAllOf)
	}

	additionalProperties := make(map[string]interface{})

	if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
		delete(additionalProperties, "ClassId")
		delete(additionalProperties, "ObjectType")
		delete(additionalProperties, "WwnId")
		delete(additionalProperties, "AssignedToEntity")
		delete(additionalProperties, "BlockHead")
		delete(additionalProperties, "Peer")
		delete(additionalProperties, "Pool")
		o.AdditionalProperties = additionalProperties
	}

	return err
}

type NullableFcpoolPoolMemberAllOf struct {
	value *FcpoolPoolMemberAllOf
	isSet bool
}

func (v NullableFcpoolPoolMemberAllOf) Get() *FcpoolPoolMemberAllOf {
	return v.value
}

func (v *NullableFcpoolPoolMemberAllOf) Set(val *FcpoolPoolMemberAllOf) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableFcpoolPoolMemberAllOf(val *FcpoolPoolMemberAllOf) *NullableFcpoolPoolMemberAllOf {
	return &NullableFcpoolPoolMemberAllOf{value: val, isSet: true}
}

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

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

Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advanced ways than the prior generations of tools. Cisco Intersight provides an integrated and intuitive management experience for resources in the traditional data center as well as at the edge. With flexible deployment options to address complex security needs, getting started with Intersight is quick and easy. Cisco Intersight has deep integration with Cisco UCS and HyperFlex systems allowing for remote deployment, configuration, and ongoing maintenance. The model-based deployment works for a single system in a remote location or hundreds of systems in a data center and enables rapid, standardized configuration and deployment. It also streamlines maintaining those systems whether you are working with small or very large configurations. The Intersight OpenAPI document defines the complete set of properties that are returned in the HTTP response. From that perspective, a client can expect that no additional properties are returned, unless these properties are explicitly defined in the OpenAPI document. However, when a client uses an older version of the Intersight OpenAPI document, the server may send additional properties because the software is more recent than the client. In that case, the client may receive properties that it does not know about. Some generated SDKs perform a strict validation of the HTTP response body against the OpenAPI document.

API version: 1.0.9-5517
Contact: intersight@cisco.com
*/

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

package intersight

import (
	"encoding/json"
)

// FcpoolPoolMemberAllOf Definition of the list of properties defined in 'fcpool.PoolMember', excluding properties defined in parent classes.
type FcpoolPoolMemberAllOf struct {
	// The fully-qualified name of the instantiated, concrete type. This property is used as a discriminator to identify the type of the payload when marshaling and unmarshaling data.
	ClassId string `json:"ClassId"`
	// The fully-qualified name of the instantiated, concrete type. The value should be the same as the 'ClassId' property.
	ObjectType string `json:"ObjectType"`
	// WWN ID of this pool member.
	WwnId *string `json:"WwnId,omitempty"`
	AssignedToEntity *MoBaseMoRelationship `json:"AssignedToEntity,omitempty"`
	BlockHead *FcpoolFcBlockRelationship `json:"BlockHead,omitempty"`
	Peer *FcpoolLeaseRelationship `json:"Peer,omitempty"`
	Pool *FcpoolPoolRelationship `json:"Pool,omitempty"`
	AdditionalProperties map[string]interface{}
}

type _FcpoolPoolMemberAllOf FcpoolPoolMemberAllOf

// NewFcpoolPoolMemberAllOf instantiates a new FcpoolPoolMemberAllOf 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 NewFcpoolPoolMemberAllOf(classId string, objectType string) *FcpoolPoolMemberAllOf {
	this := FcpoolPoolMemberAllOf{}
	this.ClassId = classId
	this.ObjectType = objectType
	return &this
}

// NewFcpoolPoolMemberAllOfWithDefaults instantiates a new FcpoolPoolMemberAllOf 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 NewFcpoolPoolMemberAllOfWithDefaults() *FcpoolPoolMemberAllOf {
	this := FcpoolPoolMemberAllOf{}
	var classId string = "fcpool.PoolMember"
	this.ClassId = classId
	var objectType string = "fcpool.PoolMember"
	this.ObjectType = objectType
	return &this
}

// GetClassId returns the ClassId field value
func (o *FcpoolPoolMemberAllOf) GetClassId() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.ClassId
}

// GetClassIdOk returns a tuple with the ClassId field value
// and a boolean to check if the value has been set.
func (o *FcpoolPoolMemberAllOf) GetClassIdOk() (*string, bool) {
	if o == nil  {
		return nil, false
	}
	return &o.ClassId, true
}

// SetClassId sets field value
func (o *FcpoolPoolMemberAllOf) SetClassId(v string) {
	o.ClassId = v
}

// GetObjectType returns the ObjectType field value
func (o *FcpoolPoolMemberAllOf) GetObjectType() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.ObjectType
}

// GetObjectTypeOk returns a tuple with the ObjectType field value
// and a boolean to check if the value has been set.
func (o *FcpoolPoolMemberAllOf) GetObjectTypeOk() (*string, bool) {
	if o == nil  {
		return nil, false
	}
	return &o.ObjectType, true
}

// SetObjectType sets field value
func (o *FcpoolPoolMemberAllOf) SetObjectType(v string) {
	o.ObjectType = v
}

// GetWwnId returns the WwnId field value if set, zero value otherwise.
func (o *FcpoolPoolMemberAllOf) GetWwnId() string {
	if o == nil || o.WwnId == nil {
		var ret string
		return ret
	}
	return *o.WwnId
}

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

// HasWwnId returns a boolean if a field has been set.
func (o *FcpoolPoolMemberAllOf) HasWwnId() bool {
	if o != nil && o.WwnId != nil {
		return true
	}

	return false
}

// SetWwnId gets a reference to the given string and assigns it to the WwnId field.
func (o *FcpoolPoolMemberAllOf) SetWwnId(v string) {
	o.WwnId = &v
}

// GetAssignedToEntity returns the AssignedToEntity field value if set, zero value otherwise.
func (o *FcpoolPoolMemberAllOf) GetAssignedToEntity() MoBaseMoRelationship {
	if o == nil || o.AssignedToEntity == nil {
		var ret MoBaseMoRelationship
		return ret
	}
	return *o.AssignedToEntity
}

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

// HasAssignedToEntity returns a boolean if a field has been set.
func (o *FcpoolPoolMemberAllOf) HasAssignedToEntity() bool {
	if o != nil && o.AssignedToEntity != nil {
		return true
	}

	return false
}

// SetAssignedToEntity gets a reference to the given MoBaseMoRelationship and assigns it to the AssignedToEntity field.
func (o *FcpoolPoolMemberAllOf) SetAssignedToEntity(v MoBaseMoRelationship) {
	o.AssignedToEntity = &v
}

// GetBlockHead returns the BlockHead field value if set, zero value otherwise.
func (o *FcpoolPoolMemberAllOf) GetBlockHead() FcpoolFcBlockRelationship {
	if o == nil || o.BlockHead == nil {
		var ret FcpoolFcBlockRelationship
		return ret
	}
	return *o.BlockHead
}

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

// HasBlockHead returns a boolean if a field has been set.
func (o *FcpoolPoolMemberAllOf) HasBlockHead() bool {
	if o != nil && o.BlockHead != nil {
		return true
	}

	return false
}

// SetBlockHead gets a reference to the given FcpoolFcBlockRelationship and assigns it to the BlockHead field.
func (o *FcpoolPoolMemberAllOf) SetBlockHead(v FcpoolFcBlockRelationship) {
	o.BlockHead = &v
}

// GetPeer returns the Peer field value if set, zero value otherwise.
func (o *FcpoolPoolMemberAllOf) GetPeer() FcpoolLeaseRelationship {
	if o == nil || o.Peer == nil {
		var ret FcpoolLeaseRelationship
		return ret
	}
	return *o.Peer
}

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

// HasPeer returns a boolean if a field has been set.
func (o *FcpoolPoolMemberAllOf) HasPeer() bool {
	if o != nil && o.Peer != nil {
		return true
	}

	return false
}

// SetPeer gets a reference to the given FcpoolLeaseRelationship and assigns it to the Peer field.
func (o *FcpoolPoolMemberAllOf) SetPeer(v FcpoolLeaseRelationship) {
	o.Peer = &v
}

// GetPool returns the Pool field value if set, zero value otherwise.
func (o *FcpoolPoolMemberAllOf) GetPool() FcpoolPoolRelationship {
	if o == nil || o.Pool == nil {
		var ret FcpoolPoolRelationship
		return ret
	}
	return *o.Pool
}

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

// HasPool returns a boolean if a field has been set.
func (o *FcpoolPoolMemberAllOf) HasPool() bool {
	if o != nil && o.Pool != nil {
		return true
	}

	return false
}

// SetPool gets a reference to the given FcpoolPoolRelationship and assigns it to the Pool field.
func (o *FcpoolPoolMemberAllOf) SetPool(v FcpoolPoolRelationship) {
	o.Pool = &v
}

func (o FcpoolPoolMemberAllOf) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if true {
		toSerialize["ClassId"] = o.ClassId
	}
	if true {
		toSerialize["ObjectType"] = o.ObjectType
	}
	if o.WwnId != nil {
		toSerialize["WwnId"] = o.WwnId
	}
	if o.AssignedToEntity != nil {
		toSerialize["AssignedToEntity"] = o.AssignedToEntity
	}
	if o.BlockHead != nil {
		toSerialize["BlockHead"] = o.BlockHead
	}
	if o.Peer != nil {
		toSerialize["Peer"] = o.Peer
	}
	if o.Pool != nil {
		toSerialize["Pool"] = o.Pool
	}

	for key, value := range o.AdditionalProperties {
		toSerialize[key] = value
	}

	return json.Marshal(toSerialize)
}

func (o *FcpoolPoolMemberAllOf) UnmarshalJSON(bytes []byte) (err error) {
	varFcpoolPoolMemberAllOf := _FcpoolPoolMemberAllOf{}

	if err = json.Unmarshal(bytes, &varFcpoolPoolMemberAllOf); err == nil {
		*o = FcpoolPoolMemberAllOf(varFcpoolPoolMemberAllOf)
	}

	additionalProperties := make(map[string]interface{})

	if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
		delete(additionalProperties, "ClassId")
		delete(additionalProperties, "ObjectType")
		delete(additionalProperties, "WwnId")
		delete(additionalProperties, "AssignedToEntity")
		delete(additionalProperties, "BlockHead")
		delete(additionalProperties, "Peer")
		delete(additionalProperties, "Pool")
		o.AdditionalProperties = additionalProperties
	}

	return err
}

type NullableFcpoolPoolMemberAllOf struct {
	value *FcpoolPoolMemberAllOf
	isSet bool
}

func (v NullableFcpoolPoolMemberAllOf) Get() *FcpoolPoolMemberAllOf {
	return v.value
}

func (v *NullableFcpoolPoolMemberAllOf) Set(val *FcpoolPoolMemberAllOf) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableFcpoolPoolMemberAllOf(val *FcpoolPoolMemberAllOf) *NullableFcpoolPoolMemberAllOf {
	return &NullableFcpoolPoolMemberAllOf{value: val, isSet: true}
}

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

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


