/*
Web Application Firewall API

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 waf

import (
	"encoding/json"
)

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

// WAFDomainList200 struct for WAFDomainList200
type WAFDomainList200 struct {
	Id *int64 `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
	Domain *string `json:"domain,omitempty"`
	Cnames []string `json:"cnames,omitempty"`
}

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

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

// GetId returns the Id field value if set, zero value otherwise.
func (o *WAFDomainList200) GetId() int64 {
	if o == nil || IsNil(o.Id) {
		var ret int64
		return ret
	}
	return *o.Id
}

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

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

	return false
}

// SetId gets a reference to the given int64 and assigns it to the Id field.
func (o *WAFDomainList200) SetId(v int64) {
	o.Id = &v
}

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

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

	return false
}

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

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

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

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

	return false
}

// SetDomain gets a reference to the given string and assigns it to the Domain field.
func (o *WAFDomainList200) SetDomain(v string) {
	o.Domain = &v
}

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

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

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

	return false
}

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

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

func (o WAFDomainList200) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Id) {
		toSerialize["id"] = o.Id
	}
	if !IsNil(o.Name) {
		toSerialize["name"] = o.Name
	}
	if !IsNil(o.Domain) {
		toSerialize["domain"] = o.Domain
	}
	if !IsNil(o.Cnames) {
		toSerialize["cnames"] = o.Cnames
	}
	return toSerialize, nil
}

type NullableWAFDomainList200 struct {
	value *WAFDomainList200
	isSet bool
}

func (v NullableWAFDomainList200) Get() *WAFDomainList200 {
	return v.value
}

func (v *NullableWAFDomainList200) Set(val *WAFDomainList200) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableWAFDomainList200(val *WAFDomainList200) *NullableWAFDomainList200 {
	return &NullableWAFDomainList200{value: val, isSet: true}
}

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

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


