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

// ApplicationOrigins struct for ApplicationOrigins
type ApplicationOrigins struct {
	Name *string `json:"name,omitempty"`
	OriginType *string `json:"origin_type,omitempty"`
	OriginId *string `json:"origin_id,omitempty"`
}

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

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

// GetName returns the Name field value if set, zero value otherwise.
func (o *ApplicationOrigins) 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 *ApplicationOrigins) 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 *ApplicationOrigins) 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 *ApplicationOrigins) SetName(v string) {
	o.Name = &v
}

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

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

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

	return false
}

// SetOriginType gets a reference to the given string and assigns it to the OriginType field.
func (o *ApplicationOrigins) SetOriginType(v string) {
	o.OriginType = &v
}

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

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

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

	return false
}

// SetOriginId gets a reference to the given string and assigns it to the OriginId field.
func (o *ApplicationOrigins) SetOriginId(v string) {
	o.OriginId = &v
}

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

func (o ApplicationOrigins) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Name) {
		toSerialize["name"] = o.Name
	}
	if !IsNil(o.OriginType) {
		toSerialize["origin_type"] = o.OriginType
	}
	if !IsNil(o.OriginId) {
		toSerialize["origin_id"] = o.OriginId
	}
	return toSerialize, nil
}

type NullableApplicationOrigins struct {
	value *ApplicationOrigins
	isSet bool
}

func (v NullableApplicationOrigins) Get() *ApplicationOrigins {
	return v.value
}

func (v *NullableApplicationOrigins) Set(val *ApplicationOrigins) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableApplicationOrigins(val *ApplicationOrigins) *NullableApplicationOrigins {
	return &NullableApplicationOrigins{value: val, isSet: true}
}

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

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


