/*
Legal Entity Management API

API version: 3
*/

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

package legalentity

import (
	"encoding/json"
	"time"

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

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

// GetPciQuestionnaireResponse struct for GetPciQuestionnaireResponse
type GetPciQuestionnaireResponse struct {
	// The generated questionnaire in a base64 encoded format.
	Content *string `json:"content,omitempty"`
	// The date the questionnaire was created, in ISO 8601 extended format. For example, 2022-12-18T10:15:30+01:00
	CreatedAt *time.Time `json:"createdAt,omitempty"`
	// The unique identifier of the signed questionnaire.
	Id *string `json:"id,omitempty"`
	// The expiration date of the questionnaire, in ISO 8601 extended format. For example, 2022-12-18T10:15:30+01:00
	ValidUntil *time.Time `json:"validUntil,omitempty"`
}

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

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

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

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

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

	return false
}

// SetContent gets a reference to the given string and assigns it to the Content field.
func (o *GetPciQuestionnaireResponse) SetContent(v string) {
	o.Content = &v
}

// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *GetPciQuestionnaireResponse) GetCreatedAt() time.Time {
	if o == nil || common.IsNil(o.CreatedAt) {
		var ret time.Time
		return ret
	}
	return *o.CreatedAt
}

// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetPciQuestionnaireResponse) GetCreatedAtOk() (*time.Time, bool) {
	if o == nil || common.IsNil(o.CreatedAt) {
		return nil, false
	}
	return o.CreatedAt, true
}

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

	return false
}

// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
func (o *GetPciQuestionnaireResponse) SetCreatedAt(v time.Time) {
	o.CreatedAt = &v
}

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

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

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

	return false
}

// SetId gets a reference to the given string and assigns it to the Id field.
func (o *GetPciQuestionnaireResponse) SetId(v string) {
	o.Id = &v
}

// GetValidUntil returns the ValidUntil field value if set, zero value otherwise.
func (o *GetPciQuestionnaireResponse) GetValidUntil() time.Time {
	if o == nil || common.IsNil(o.ValidUntil) {
		var ret time.Time
		return ret
	}
	return *o.ValidUntil
}

// GetValidUntilOk returns a tuple with the ValidUntil field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetPciQuestionnaireResponse) GetValidUntilOk() (*time.Time, bool) {
	if o == nil || common.IsNil(o.ValidUntil) {
		return nil, false
	}
	return o.ValidUntil, true
}

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

	return false
}

// SetValidUntil gets a reference to the given time.Time and assigns it to the ValidUntil field.
func (o *GetPciQuestionnaireResponse) SetValidUntil(v time.Time) {
	o.ValidUntil = &v
}

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

func (o GetPciQuestionnaireResponse) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !common.IsNil(o.Content) {
		toSerialize["content"] = o.Content
	}
	if !common.IsNil(o.CreatedAt) {
		toSerialize["createdAt"] = o.CreatedAt
	}
	if !common.IsNil(o.Id) {
		toSerialize["id"] = o.Id
	}
	if !common.IsNil(o.ValidUntil) {
		toSerialize["validUntil"] = o.ValidUntil
	}
	return toSerialize, nil
}

type NullableGetPciQuestionnaireResponse struct {
	value *GetPciQuestionnaireResponse
	isSet bool
}

func (v NullableGetPciQuestionnaireResponse) Get() *GetPciQuestionnaireResponse {
	return v.value
}

func (v *NullableGetPciQuestionnaireResponse) Set(val *GetPciQuestionnaireResponse) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableGetPciQuestionnaireResponse(val *GetPciQuestionnaireResponse) *NullableGetPciQuestionnaireResponse {
	return &NullableGetPciQuestionnaireResponse{value: val, isSet: true}
}

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

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