/*
 * 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"
)

// ResourceMembers struct for ResourceMembers
type ResourceMembers struct {
	Links *UsersLinks       `json:"links,omitempty" yaml:"links,omitempty"`
	Users *[]ResourceMember `json:"users,omitempty" yaml:"users,omitempty"`
}

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

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

// GetLinks returns the Links field value if set, zero value otherwise.
func (o *ResourceMembers) GetLinks() UsersLinks {
	if o == nil || o.Links == nil {
		var ret UsersLinks
		return ret
	}
	return *o.Links
}

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

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

	return false
}

// SetLinks gets a reference to the given UsersLinks and assigns it to the Links field.
func (o *ResourceMembers) SetLinks(v UsersLinks) {
	o.Links = &v
}

// GetUsers returns the Users field value if set, zero value otherwise.
func (o *ResourceMembers) GetUsers() []ResourceMember {
	if o == nil || o.Users == nil {
		var ret []ResourceMember
		return ret
	}
	return *o.Users
}

// GetUsersOk returns a tuple with the Users field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ResourceMembers) GetUsersOk() (*[]ResourceMember, bool) {
	if o == nil || o.Users == nil {
		return nil, false
	}
	return o.Users, true
}

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

	return false
}

// SetUsers gets a reference to the given []ResourceMember and assigns it to the Users field.
func (o *ResourceMembers) SetUsers(v []ResourceMember) {
	o.Users = &v
}

func (o ResourceMembers) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.Links != nil {
		toSerialize["links"] = o.Links
	}
	if o.Users != nil {
		toSerialize["users"] = o.Users
	}
	return json.Marshal(toSerialize)
}

type NullableResourceMembers struct {
	value *ResourceMembers
	isSet bool
}

func (v NullableResourceMembers) Get() *ResourceMembers {
	return v.value
}

func (v *NullableResourceMembers) Set(val *ResourceMembers) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableResourceMembers(val *ResourceMembers) *NullableResourceMembers {
	return &NullableResourceMembers{value: val, isSet: true}
}

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

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