/*
 * Subset of Influx API covered by Influx CLI
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * API version: 2.0.0
 */

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

package api

import (
	"encoding/json"
)

// ResourceMemberAllOf struct for ResourceMemberAllOf
type ResourceMemberAllOf struct {
	Role *string `json:"role,omitempty" yaml:"role,omitempty"`
}

// NewResourceMemberAllOf instantiates a new ResourceMemberAllOf 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 NewResourceMemberAllOf() *ResourceMemberAllOf {
	this := ResourceMemberAllOf{}
	var role string = "member"
	this.Role = &role
	return &this
}

// NewResourceMemberAllOfWithDefaults instantiates a new ResourceMemberAllOf 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 NewResourceMemberAllOfWithDefaults() *ResourceMemberAllOf {
	this := ResourceMemberAllOf{}
	var role string = "member"
	this.Role = &role
	return &this
}

// GetRole returns the Role field value if set, zero value otherwise.
func (o *ResourceMemberAllOf) GetRole() string {
	if o == nil || o.Role == nil {
		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 *ResourceMemberAllOf) GetRoleOk() (*string, bool) {
	if o == nil || o.Role == nil {
		return nil, false
	}
	return o.Role, true
}

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

	return false
}

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

func (o ResourceMemberAllOf) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.Role != nil {
		toSerialize["role"] = o.Role
	}
	return json.Marshal(toSerialize)
}

type NullableResourceMemberAllOf struct {
	value *ResourceMemberAllOf
	isSet bool
}

func (v NullableResourceMemberAllOf) Get() *ResourceMemberAllOf {
	return v.value
}

func (v *NullableResourceMemberAllOf) Set(val *ResourceMemberAllOf) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableResourceMemberAllOf(val *ResourceMemberAllOf) *NullableResourceMemberAllOf {
	return &NullableResourceMemberAllOf{value: val, isSet: true}
}

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

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