/*
Edge Application 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 edgeapplications

import (
	"encoding/json"
)

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

// RulesEngineBehaviorTargetOneOf struct for RulesEngineBehaviorTargetOneOf
type RulesEngineBehaviorTargetOneOf struct {
	CapturedArray *string `json:"captured_array,omitempty"`
	Subject *string `json:"subject,omitempty"`
	Regex *string `json:"regex,omitempty"`
}

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

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

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

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

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

	return false
}

// SetCapturedArray gets a reference to the given string and assigns it to the CapturedArray field.
func (o *RulesEngineBehaviorTargetOneOf) SetCapturedArray(v string) {
	o.CapturedArray = &v
}

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

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

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

	return false
}

// SetSubject gets a reference to the given string and assigns it to the Subject field.
func (o *RulesEngineBehaviorTargetOneOf) SetSubject(v string) {
	o.Subject = &v
}

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

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

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

	return false
}

// SetRegex gets a reference to the given string and assigns it to the Regex field.
func (o *RulesEngineBehaviorTargetOneOf) SetRegex(v string) {
	o.Regex = &v
}

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

func (o RulesEngineBehaviorTargetOneOf) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.CapturedArray) {
		toSerialize["captured_array"] = o.CapturedArray
	}
	if !IsNil(o.Subject) {
		toSerialize["subject"] = o.Subject
	}
	if !IsNil(o.Regex) {
		toSerialize["regex"] = o.Regex
	}
	return toSerialize, nil
}

type NullableRulesEngineBehaviorTargetOneOf struct {
	value *RulesEngineBehaviorTargetOneOf
	isSet bool
}

func (v NullableRulesEngineBehaviorTargetOneOf) Get() *RulesEngineBehaviorTargetOneOf {
	return v.value
}

func (v *NullableRulesEngineBehaviorTargetOneOf) Set(val *RulesEngineBehaviorTargetOneOf) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableRulesEngineBehaviorTargetOneOf(val *RulesEngineBehaviorTargetOneOf) *NullableRulesEngineBehaviorTargetOneOf {
	return &NullableRulesEngineBehaviorTargetOneOf{value: val, isSet: true}
}

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

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


