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

// TelegrafPluginRequestPlugins struct for TelegrafPluginRequestPlugins
type TelegrafPluginRequestPlugins struct {
	Type        *string `json:"type,omitempty" yaml:"type,omitempty"`
	Name        *string `json:"name,omitempty" yaml:"name,omitempty"`
	Alias       *string `json:"alias,omitempty" yaml:"alias,omitempty"`
	Description *string `json:"description,omitempty" yaml:"description,omitempty"`
	Config      *string `json:"config,omitempty" yaml:"config,omitempty"`
}

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

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

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

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

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

	return false
}

// SetType gets a reference to the given string and assigns it to the Type field.
func (o *TelegrafPluginRequestPlugins) SetType(v string) {
	o.Type = &v
}

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

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

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

	return false
}

// SetName gets a reference to the given string and assigns it to the Name field.
func (o *TelegrafPluginRequestPlugins) SetName(v string) {
	o.Name = &v
}

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

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

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

	return false
}

// SetAlias gets a reference to the given string and assigns it to the Alias field.
func (o *TelegrafPluginRequestPlugins) SetAlias(v string) {
	o.Alias = &v
}

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

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

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

	return false
}

// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *TelegrafPluginRequestPlugins) SetDescription(v string) {
	o.Description = &v
}

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

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

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

	return false
}

// SetConfig gets a reference to the given string and assigns it to the Config field.
func (o *TelegrafPluginRequestPlugins) SetConfig(v string) {
	o.Config = &v
}

func (o TelegrafPluginRequestPlugins) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.Type != nil {
		toSerialize["type"] = o.Type
	}
	if o.Name != nil {
		toSerialize["name"] = o.Name
	}
	if o.Alias != nil {
		toSerialize["alias"] = o.Alias
	}
	if o.Description != nil {
		toSerialize["description"] = o.Description
	}
	if o.Config != nil {
		toSerialize["config"] = o.Config
	}
	return json.Marshal(toSerialize)
}

type NullableTelegrafPluginRequestPlugins struct {
	value *TelegrafPluginRequestPlugins
	isSet bool
}

func (v NullableTelegrafPluginRequestPlugins) Get() *TelegrafPluginRequestPlugins {
	return v.value
}

func (v *NullableTelegrafPluginRequestPlugins) Set(val *TelegrafPluginRequestPlugins) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableTelegrafPluginRequestPlugins(val *TelegrafPluginRequestPlugins) *NullableTelegrafPluginRequestPlugins {
	return &NullableTelegrafPluginRequestPlugins{value: val, isSet: true}
}

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

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