/*
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 WAFEvents200ResultsInner type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &WAFEvents200ResultsInner{}

// WAFEvents200ResultsInner struct for WAFEvents200ResultsInner
type WAFEvents200ResultsInner struct {
	CountryCount *int64 `json:"country_count,omitempty"`
	Top10Countries []WAFEvents200ResultsInnerTop10CountriesInner `json:"top_10_countries,omitempty"`
	Top10Ips []WAFEvents200ResultsInnerTop10CountriesInner `json:"top_10_ips,omitempty"`
	HitCount *int64 `json:"hit_count,omitempty"`
	RuleId *int64 `json:"rule_id,omitempty"`
	IpCount *int64 `json:"ip_count,omitempty"`
	MatchZone *string `json:"match_zone,omitempty"`
	PathCount *int64 `json:"path_count,omitempty"`
	MatchesOn *string `json:"matches_on,omitempty"`
	RuleDescription *string `json:"rule_description,omitempty"`
}

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

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

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

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

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

	return false
}

// SetCountryCount gets a reference to the given int64 and assigns it to the CountryCount field.
func (o *WAFEvents200ResultsInner) SetCountryCount(v int64) {
	o.CountryCount = &v
}

// GetTop10Countries returns the Top10Countries field value if set, zero value otherwise.
func (o *WAFEvents200ResultsInner) GetTop10Countries() []WAFEvents200ResultsInnerTop10CountriesInner {
	if o == nil || IsNil(o.Top10Countries) {
		var ret []WAFEvents200ResultsInnerTop10CountriesInner
		return ret
	}
	return o.Top10Countries
}

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

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

	return false
}

// SetTop10Countries gets a reference to the given []WAFEvents200ResultsInnerTop10CountriesInner and assigns it to the Top10Countries field.
func (o *WAFEvents200ResultsInner) SetTop10Countries(v []WAFEvents200ResultsInnerTop10CountriesInner) {
	o.Top10Countries = v
}

// GetTop10Ips returns the Top10Ips field value if set, zero value otherwise.
func (o *WAFEvents200ResultsInner) GetTop10Ips() []WAFEvents200ResultsInnerTop10CountriesInner {
	if o == nil || IsNil(o.Top10Ips) {
		var ret []WAFEvents200ResultsInnerTop10CountriesInner
		return ret
	}
	return o.Top10Ips
}

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

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

	return false
}

// SetTop10Ips gets a reference to the given []WAFEvents200ResultsInnerTop10CountriesInner and assigns it to the Top10Ips field.
func (o *WAFEvents200ResultsInner) SetTop10Ips(v []WAFEvents200ResultsInnerTop10CountriesInner) {
	o.Top10Ips = v
}

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

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

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

	return false
}

// SetHitCount gets a reference to the given int64 and assigns it to the HitCount field.
func (o *WAFEvents200ResultsInner) SetHitCount(v int64) {
	o.HitCount = &v
}

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

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

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

	return false
}

// SetRuleId gets a reference to the given int64 and assigns it to the RuleId field.
func (o *WAFEvents200ResultsInner) SetRuleId(v int64) {
	o.RuleId = &v
}

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

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

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

	return false
}

// SetIpCount gets a reference to the given int64 and assigns it to the IpCount field.
func (o *WAFEvents200ResultsInner) SetIpCount(v int64) {
	o.IpCount = &v
}

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

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

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

	return false
}

// SetMatchZone gets a reference to the given string and assigns it to the MatchZone field.
func (o *WAFEvents200ResultsInner) SetMatchZone(v string) {
	o.MatchZone = &v
}

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

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

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

	return false
}

// SetPathCount gets a reference to the given int64 and assigns it to the PathCount field.
func (o *WAFEvents200ResultsInner) SetPathCount(v int64) {
	o.PathCount = &v
}

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

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

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

	return false
}

// SetMatchesOn gets a reference to the given string and assigns it to the MatchesOn field.
func (o *WAFEvents200ResultsInner) SetMatchesOn(v string) {
	o.MatchesOn = &v
}

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

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

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

	return false
}

// SetRuleDescription gets a reference to the given string and assigns it to the RuleDescription field.
func (o *WAFEvents200ResultsInner) SetRuleDescription(v string) {
	o.RuleDescription = &v
}

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

func (o WAFEvents200ResultsInner) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.CountryCount) {
		toSerialize["country_count"] = o.CountryCount
	}
	if !IsNil(o.Top10Countries) {
		toSerialize["top_10_countries"] = o.Top10Countries
	}
	if !IsNil(o.Top10Ips) {
		toSerialize["top_10_ips"] = o.Top10Ips
	}
	if !IsNil(o.HitCount) {
		toSerialize["hit_count"] = o.HitCount
	}
	if !IsNil(o.RuleId) {
		toSerialize["rule_id"] = o.RuleId
	}
	if !IsNil(o.IpCount) {
		toSerialize["ip_count"] = o.IpCount
	}
	if !IsNil(o.MatchZone) {
		toSerialize["match_zone"] = o.MatchZone
	}
	if !IsNil(o.PathCount) {
		toSerialize["path_count"] = o.PathCount
	}
	if !IsNil(o.MatchesOn) {
		toSerialize["matches_on"] = o.MatchesOn
	}
	if !IsNil(o.RuleDescription) {
		toSerialize["rule_description"] = o.RuleDescription
	}
	return toSerialize, nil
}

type NullableWAFEvents200ResultsInner struct {
	value *WAFEvents200ResultsInner
	isSet bool
}

func (v NullableWAFEvents200ResultsInner) Get() *WAFEvents200ResultsInner {
	return v.value
}

func (v *NullableWAFEvents200ResultsInner) Set(val *WAFEvents200ResultsInner) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableWAFEvents200ResultsInner(val *WAFEvents200ResultsInner) *NullableWAFEvents200ResultsInner {
	return &NullableWAFEvents200ResultsInner{value: val, isSet: true}
}

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

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


