/*
Intelligent DNS API

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

API version: 1.0.0
*/

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

package idns

import (
	"encoding/json"
)

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

// RecordGet struct for RecordGet
type RecordGet struct {
	RecordId *int32 `json:"record_id,omitempty"`
	Entry *string `json:"entry,omitempty"`
	Description *string `json:"description,omitempty"`
	AnswersList []string `json:"answers_list,omitempty"`
	Policy *string `json:"policy,omitempty"`
	Weight *int32 `json:"weight,omitempty"`
	RecordType *string `json:"record_type,omitempty"`
	Ttl *int32 `json:"ttl,omitempty"`
}

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

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

// GetRecordId returns the RecordId field value if set, zero value otherwise.
func (o *RecordGet) GetRecordId() int32 {
	if o == nil || IsNil(o.RecordId) {
		var ret int32
		return ret
	}
	return *o.RecordId
}

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

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

	return false
}

// SetRecordId gets a reference to the given int32 and assigns it to the RecordId field.
func (o *RecordGet) SetRecordId(v int32) {
	o.RecordId = &v
}

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

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

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

	return false
}

// SetEntry gets a reference to the given string and assigns it to the Entry field.
func (o *RecordGet) SetEntry(v string) {
	o.Entry = &v
}

// GetDescription returns the Description field value if set, zero value otherwise.
func (o *RecordGet) GetDescription() string {
	if o == nil || IsNil(o.Description) {
		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 *RecordGet) GetDescriptionOk() (*string, bool) {
	if o == nil || IsNil(o.Description) {
		return nil, false
	}
	return o.Description, true
}

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

	return false
}

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

// GetAnswersList returns the AnswersList field value if set, zero value otherwise.
func (o *RecordGet) GetAnswersList() []string {
	if o == nil || IsNil(o.AnswersList) {
		var ret []string
		return ret
	}
	return o.AnswersList
}

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

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

	return false
}

// SetAnswersList gets a reference to the given []string and assigns it to the AnswersList field.
func (o *RecordGet) SetAnswersList(v []string) {
	o.AnswersList = v
}

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

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

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

	return false
}

// SetPolicy gets a reference to the given string and assigns it to the Policy field.
func (o *RecordGet) SetPolicy(v string) {
	o.Policy = &v
}

// GetWeight returns the Weight field value if set, zero value otherwise.
func (o *RecordGet) GetWeight() int32 {
	if o == nil || IsNil(o.Weight) {
		var ret int32
		return ret
	}
	return *o.Weight
}

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

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

	return false
}

// SetWeight gets a reference to the given int32 and assigns it to the Weight field.
func (o *RecordGet) SetWeight(v int32) {
	o.Weight = &v
}

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

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

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

	return false
}

// SetRecordType gets a reference to the given string and assigns it to the RecordType field.
func (o *RecordGet) SetRecordType(v string) {
	o.RecordType = &v
}

// GetTtl returns the Ttl field value if set, zero value otherwise.
func (o *RecordGet) GetTtl() int32 {
	if o == nil || IsNil(o.Ttl) {
		var ret int32
		return ret
	}
	return *o.Ttl
}

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

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

	return false
}

// SetTtl gets a reference to the given int32 and assigns it to the Ttl field.
func (o *RecordGet) SetTtl(v int32) {
	o.Ttl = &v
}

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

func (o RecordGet) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.RecordId) {
		toSerialize["record_id"] = o.RecordId
	}
	if !IsNil(o.Entry) {
		toSerialize["entry"] = o.Entry
	}
	if !IsNil(o.Description) {
		toSerialize["description"] = o.Description
	}
	if !IsNil(o.AnswersList) {
		toSerialize["answers_list"] = o.AnswersList
	}
	if !IsNil(o.Policy) {
		toSerialize["policy"] = o.Policy
	}
	if !IsNil(o.Weight) {
		toSerialize["weight"] = o.Weight
	}
	if !IsNil(o.RecordType) {
		toSerialize["record_type"] = o.RecordType
	}
	if !IsNil(o.Ttl) {
		toSerialize["ttl"] = o.Ttl
	}
	return toSerialize, nil
}

type NullableRecordGet struct {
	value *RecordGet
	isSet bool
}

func (v NullableRecordGet) Get() *RecordGet {
	return v.value
}

func (v *NullableRecordGet) Set(val *RecordGet) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableRecordGet(val *RecordGet) *NullableRecordGet {
	return &NullableRecordGet{value: val, isSet: true}
}

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

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


