/*
Configuration API

API version: 2
*/

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

package balanceplatform

import (
	"encoding/json"

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

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

// GetTaxFormResponse struct for GetTaxFormResponse
type GetTaxFormResponse struct {
	// The content of the tax form in Base64 format.
	Content string `json:"content"`
	// The content type of the tax form.  Possible values: *  **application/pdf**
	ContentType *string `json:"contentType,omitempty"`
}

// NewGetTaxFormResponse instantiates a new GetTaxFormResponse 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 NewGetTaxFormResponse(content string) *GetTaxFormResponse {
	this := GetTaxFormResponse{}
	this.Content = content
	return &this
}

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

// GetContent returns the Content field value
func (o *GetTaxFormResponse) GetContent() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Content
}

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

// SetContent sets field value
func (o *GetTaxFormResponse) SetContent(v string) {
	o.Content = v
}

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

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

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

	return false
}

// SetContentType gets a reference to the given string and assigns it to the ContentType field.
func (o *GetTaxFormResponse) SetContentType(v string) {
	o.ContentType = &v
}

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

func (o GetTaxFormResponse) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	toSerialize["content"] = o.Content
	if !common.IsNil(o.ContentType) {
		toSerialize["contentType"] = o.ContentType
	}
	return toSerialize, nil
}

type NullableGetTaxFormResponse struct {
	value *GetTaxFormResponse
	isSet bool
}

func (v NullableGetTaxFormResponse) Get() *GetTaxFormResponse {
	return v.value
}

func (v *NullableGetTaxFormResponse) Set(val *GetTaxFormResponse) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableGetTaxFormResponse(val *GetTaxFormResponse) *NullableGetTaxFormResponse {
	return &NullableGetTaxFormResponse{value: val, isSet: true}
}

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

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

func (o *GetTaxFormResponse) isValidContentType() bool {
	var allowedEnumValues = []string{"application/pdf"}
	for _, allowed := range allowedEnumValues {
		if o.GetContentType() == allowed {
			return true
		}
	}
	return false
}
