/*
Adyen Recurring API

API version: 68
*/

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

package recurring

import (
	"encoding/json"

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

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

// NotifyShopperResult struct for NotifyShopperResult
type NotifyShopperResult struct {
	// Reference of Pre-debit notification that is displayed to the shopper
	DisplayedReference *string `json:"displayedReference,omitempty"`
	// A simple description of the `resultCode`.
	Message *string `json:"message,omitempty"`
	// The unique reference that is associated with the request.
	PspReference *string `json:"pspReference,omitempty"`
	// Reference of Pre-debit notification sent in my the merchant
	Reference *string `json:"reference,omitempty"`
	// The code indicating the status of notification.
	ResultCode *string `json:"resultCode,omitempty"`
	// The unique reference for the request sent downstream.
	ShopperNotificationReference *string `json:"shopperNotificationReference,omitempty"`
	// This is the recurringDetailReference returned in the response when token was created
	StoredPaymentMethodId *string `json:"storedPaymentMethodId,omitempty"`
}

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

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

// GetDisplayedReference returns the DisplayedReference field value if set, zero value otherwise.
func (o *NotifyShopperResult) GetDisplayedReference() string {
	if o == nil || common.IsNil(o.DisplayedReference) {
		var ret string
		return ret
	}
	return *o.DisplayedReference
}

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

// HasDisplayedReference returns a boolean if a field has been set.
func (o *NotifyShopperResult) HasDisplayedReference() bool {
	if o != nil && !common.IsNil(o.DisplayedReference) {
		return true
	}

	return false
}

// SetDisplayedReference gets a reference to the given string and assigns it to the DisplayedReference field.
func (o *NotifyShopperResult) SetDisplayedReference(v string) {
	o.DisplayedReference = &v
}

// GetMessage returns the Message field value if set, zero value otherwise.
func (o *NotifyShopperResult) GetMessage() string {
	if o == nil || common.IsNil(o.Message) {
		var ret string
		return ret
	}
	return *o.Message
}

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

// HasMessage returns a boolean if a field has been set.
func (o *NotifyShopperResult) HasMessage() bool {
	if o != nil && !common.IsNil(o.Message) {
		return true
	}

	return false
}

// SetMessage gets a reference to the given string and assigns it to the Message field.
func (o *NotifyShopperResult) SetMessage(v string) {
	o.Message = &v
}

// GetPspReference returns the PspReference field value if set, zero value otherwise.
func (o *NotifyShopperResult) GetPspReference() string {
	if o == nil || common.IsNil(o.PspReference) {
		var ret string
		return ret
	}
	return *o.PspReference
}

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

// HasPspReference returns a boolean if a field has been set.
func (o *NotifyShopperResult) HasPspReference() bool {
	if o != nil && !common.IsNil(o.PspReference) {
		return true
	}

	return false
}

// SetPspReference gets a reference to the given string and assigns it to the PspReference field.
func (o *NotifyShopperResult) SetPspReference(v string) {
	o.PspReference = &v
}

// GetReference returns the Reference field value if set, zero value otherwise.
func (o *NotifyShopperResult) GetReference() string {
	if o == nil || common.IsNil(o.Reference) {
		var ret string
		return ret
	}
	return *o.Reference
}

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

// HasReference returns a boolean if a field has been set.
func (o *NotifyShopperResult) HasReference() bool {
	if o != nil && !common.IsNil(o.Reference) {
		return true
	}

	return false
}

// SetReference gets a reference to the given string and assigns it to the Reference field.
func (o *NotifyShopperResult) SetReference(v string) {
	o.Reference = &v
}

// GetResultCode returns the ResultCode field value if set, zero value otherwise.
func (o *NotifyShopperResult) GetResultCode() string {
	if o == nil || common.IsNil(o.ResultCode) {
		var ret string
		return ret
	}
	return *o.ResultCode
}

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

// HasResultCode returns a boolean if a field has been set.
func (o *NotifyShopperResult) HasResultCode() bool {
	if o != nil && !common.IsNil(o.ResultCode) {
		return true
	}

	return false
}

// SetResultCode gets a reference to the given string and assigns it to the ResultCode field.
func (o *NotifyShopperResult) SetResultCode(v string) {
	o.ResultCode = &v
}

// GetShopperNotificationReference returns the ShopperNotificationReference field value if set, zero value otherwise.
func (o *NotifyShopperResult) GetShopperNotificationReference() string {
	if o == nil || common.IsNil(o.ShopperNotificationReference) {
		var ret string
		return ret
	}
	return *o.ShopperNotificationReference
}

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

// HasShopperNotificationReference returns a boolean if a field has been set.
func (o *NotifyShopperResult) HasShopperNotificationReference() bool {
	if o != nil && !common.IsNil(o.ShopperNotificationReference) {
		return true
	}

	return false
}

// SetShopperNotificationReference gets a reference to the given string and assigns it to the ShopperNotificationReference field.
func (o *NotifyShopperResult) SetShopperNotificationReference(v string) {
	o.ShopperNotificationReference = &v
}

// GetStoredPaymentMethodId returns the StoredPaymentMethodId field value if set, zero value otherwise.
func (o *NotifyShopperResult) GetStoredPaymentMethodId() string {
	if o == nil || common.IsNil(o.StoredPaymentMethodId) {
		var ret string
		return ret
	}
	return *o.StoredPaymentMethodId
}

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

// HasStoredPaymentMethodId returns a boolean if a field has been set.
func (o *NotifyShopperResult) HasStoredPaymentMethodId() bool {
	if o != nil && !common.IsNil(o.StoredPaymentMethodId) {
		return true
	}

	return false
}

// SetStoredPaymentMethodId gets a reference to the given string and assigns it to the StoredPaymentMethodId field.
func (o *NotifyShopperResult) SetStoredPaymentMethodId(v string) {
	o.StoredPaymentMethodId = &v
}

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

func (o NotifyShopperResult) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !common.IsNil(o.DisplayedReference) {
		toSerialize["displayedReference"] = o.DisplayedReference
	}
	if !common.IsNil(o.Message) {
		toSerialize["message"] = o.Message
	}
	if !common.IsNil(o.PspReference) {
		toSerialize["pspReference"] = o.PspReference
	}
	if !common.IsNil(o.Reference) {
		toSerialize["reference"] = o.Reference
	}
	if !common.IsNil(o.ResultCode) {
		toSerialize["resultCode"] = o.ResultCode
	}
	if !common.IsNil(o.ShopperNotificationReference) {
		toSerialize["shopperNotificationReference"] = o.ShopperNotificationReference
	}
	if !common.IsNil(o.StoredPaymentMethodId) {
		toSerialize["storedPaymentMethodId"] = o.StoredPaymentMethodId
	}
	return toSerialize, nil
}

type NullableNotifyShopperResult struct {
	value *NotifyShopperResult
	isSet bool
}

func (v NullableNotifyShopperResult) Get() *NotifyShopperResult {
	return v.value
}

func (v *NullableNotifyShopperResult) Set(val *NotifyShopperResult) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableNotifyShopperResult(val *NotifyShopperResult) *NullableNotifyShopperResult {
	return &NullableNotifyShopperResult{value: val, isSet: true}
}

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

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