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

// RemoteConnections struct for RemoteConnections
type RemoteConnections struct {
	Remotes *[]RemoteConnection `json:"remotes,omitempty" yaml:"remotes,omitempty"`
}

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

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

// GetRemotes returns the Remotes field value if set, zero value otherwise.
func (o *RemoteConnections) GetRemotes() []RemoteConnection {
	if o == nil || o.Remotes == nil {
		var ret []RemoteConnection
		return ret
	}
	return *o.Remotes
}

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

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

	return false
}

// SetRemotes gets a reference to the given []RemoteConnection and assigns it to the Remotes field.
func (o *RemoteConnections) SetRemotes(v []RemoteConnection) {
	o.Remotes = &v
}

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

type NullableRemoteConnections struct {
	value *RemoteConnections
	isSet bool
}

func (v NullableRemoteConnections) Get() *RemoteConnections {
	return v.value
}

func (v *NullableRemoteConnections) Set(val *RemoteConnections) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableRemoteConnections(val *RemoteConnections) *NullableRemoteConnections {
	return &NullableRemoteConnections{value: val, isSet: true}
}

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

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