/*
 * Svix API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * API version: 1.1.1
 */

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

package openapi

import (
	"encoding/json"
	"time"
)

// RecoverIn struct for RecoverIn
type RecoverIn struct {
	Since time.Time `json:"since"`
	Until NullableTime `json:"until,omitempty"`
}

// NewRecoverIn instantiates a new RecoverIn 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 NewRecoverIn(since time.Time) *RecoverIn {
	this := RecoverIn{}
	this.Since = since
	return &this
}

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

// GetSince returns the Since field value
func (o *RecoverIn) GetSince() time.Time {
	if o == nil {
		var ret time.Time
		return ret
	}

	return o.Since
}

// GetSinceOk returns a tuple with the Since field value
// and a boolean to check if the value has been set.
func (o *RecoverIn) GetSinceOk() (*time.Time, bool) {
	if o == nil  {
		return nil, false
	}
	return &o.Since, true
}

// SetSince sets field value
func (o *RecoverIn) SetSince(v time.Time) {
	o.Since = v
}

// GetUntil returns the Until field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *RecoverIn) GetUntil() time.Time {
	if o == nil || o.Until.Get() == nil {
		var ret time.Time
		return ret
	}
	return *o.Until.Get()
}

// GetUntilOk returns a tuple with the Until field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *RecoverIn) GetUntilOk() (*time.Time, bool) {
	if o == nil  {
		return nil, false
	}
	return o.Until.Get(), o.Until.IsSet()
}

// HasUntil returns a boolean if a field has been set.
func (o *RecoverIn) HasUntil() bool {
	if o != nil && o.Until.IsSet() {
		return true
	}

	return false
}

// SetUntil gets a reference to the given NullableTime and assigns it to the Until field.
func (o *RecoverIn) SetUntil(v time.Time) {
	o.Until.Set(&v)
}
// SetUntilNil sets the value for Until to be an explicit nil
func (o *RecoverIn) SetUntilNil() {
	o.Until.Set(nil)
}

// UnsetUntil ensures that no value is present for Until, not even an explicit nil
func (o *RecoverIn) UnsetUntil() {
	o.Until.Unset()
}

func (o RecoverIn) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if true {
		toSerialize["since"] = o.Since
	}
	if o.Until.IsSet() {
		toSerialize["until"] = o.Until.Get()
	}
	return json.Marshal(toSerialize)
}

type NullableRecoverIn struct {
	value *RecoverIn
	isSet bool
}

func (v NullableRecoverIn) Get() *RecoverIn {
	return v.value
}

func (v *NullableRecoverIn) Set(val *RecoverIn) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableRecoverIn(val *RecoverIn) *NullableRecoverIn {
	return &NullableRecoverIn{value: val, isSet: true}
}

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

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


