/*
gravity

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

API version: 0.28.1
*/

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

package api

import (
	"encoding/json"
)

// checks if the DhcpAPIScopesImportInput type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DhcpAPIScopesImportInput{}

// DhcpAPIScopesImportInput struct for DhcpAPIScopesImportInput
type DhcpAPIScopesImportInput struct {
	Payload *string                    `json:"payload,omitempty"`
	Type    *DhcpAPIScopesImporterType `json:"type,omitempty"`
}

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

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

// GetPayload returns the Payload field value if set, zero value otherwise.
func (o *DhcpAPIScopesImportInput) GetPayload() string {
	if o == nil || IsNil(o.Payload) {
		var ret string
		return ret
	}
	return *o.Payload
}

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

// HasPayload returns a boolean if a field has been set.
func (o *DhcpAPIScopesImportInput) HasPayload() bool {
	if o != nil && !IsNil(o.Payload) {
		return true
	}

	return false
}

// SetPayload gets a reference to the given string and assigns it to the Payload field.
func (o *DhcpAPIScopesImportInput) SetPayload(v string) {
	o.Payload = &v
}

// GetType returns the Type field value if set, zero value otherwise.
func (o *DhcpAPIScopesImportInput) GetType() DhcpAPIScopesImporterType {
	if o == nil || IsNil(o.Type) {
		var ret DhcpAPIScopesImporterType
		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 *DhcpAPIScopesImportInput) GetTypeOk() (*DhcpAPIScopesImporterType, bool) {
	if o == nil || IsNil(o.Type) {
		return nil, false
	}
	return o.Type, true
}

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

	return false
}

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

func (o DhcpAPIScopesImportInput) MarshalJSON() ([]byte, error) {
	toSerialize, err := o.ToMap()
	if err != nil {
		return []byte{}, err
	}
	return json.Marshal(toSerialize)
}

func (o DhcpAPIScopesImportInput) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Payload) {
		toSerialize["payload"] = o.Payload
	}
	if !IsNil(o.Type) {
		toSerialize["type"] = o.Type
	}
	return toSerialize, nil
}

type NullableDhcpAPIScopesImportInput struct {
	value *DhcpAPIScopesImportInput
	isSet bool
}

func (v NullableDhcpAPIScopesImportInput) Get() *DhcpAPIScopesImportInput {
	return v.value
}

func (v *NullableDhcpAPIScopesImportInput) Set(val *DhcpAPIScopesImportInput) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableDhcpAPIScopesImportInput(val *DhcpAPIScopesImportInput) *NullableDhcpAPIScopesImportInput {
	return &NullableDhcpAPIScopesImportInput{value: val, isSet: true}
}

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

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