/*
Authentication webhooks

API version: 1
*/

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

package acswebhook

import (
	"encoding/json"

	"github.com/adyen/adyen-go-api-library/v21/src/common"
)

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

// AuthenticationDecision struct for AuthenticationDecision
type AuthenticationDecision struct {
	// The status of the authentication.   Possible values:   * **refused**   * **proceed**   For more information, refer to [Authenticate cardholders using the Authentication SDK](https://docs.adyen.com/issuing/3d-secure/oob-auth-sdk/authenticate-cardholders/).
	Status string `json:"status"`
}

// NewAuthenticationDecision instantiates a new AuthenticationDecision 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 NewAuthenticationDecision(status string) *AuthenticationDecision {
	this := AuthenticationDecision{}
	this.Status = status
	return &this
}

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

// GetStatus returns the Status field value
func (o *AuthenticationDecision) GetStatus() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Status
}

// GetStatusOk returns a tuple with the Status field value
// and a boolean to check if the value has been set.
func (o *AuthenticationDecision) GetStatusOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Status, true
}

// SetStatus sets field value
func (o *AuthenticationDecision) SetStatus(v string) {
	o.Status = v
}

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

func (o AuthenticationDecision) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	toSerialize["status"] = o.Status
	return toSerialize, nil
}

type NullableAuthenticationDecision struct {
	value *AuthenticationDecision
	isSet bool
}

func (v NullableAuthenticationDecision) Get() *AuthenticationDecision {
	return v.value
}

func (v *NullableAuthenticationDecision) Set(val *AuthenticationDecision) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableAuthenticationDecision(val *AuthenticationDecision) *NullableAuthenticationDecision {
	return &NullableAuthenticationDecision{value: val, isSet: true}
}

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

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

func (o *AuthenticationDecision) isValidStatus() bool {
	var allowedEnumValues = []string{"proceed", "refused"}
	for _, allowed := range allowedEnumValues {
		if o.GetStatus() == allowed {
			return true
		}
	}
	return false
}
