/*
Mender API

Combined API specification for the features of the different Mender backend services, suitable for code generation applications 

API version: 1
Contact: support@mender.io
*/

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

package client

import (
	"encoding/json"
)

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

// CompleteDirectUpload404Response struct for CompleteDirectUpload404Response
type CompleteDirectUpload404Response struct {
	Error *string `json:"error,omitempty"`
	// Request identifier (Header: X-Men-Requestid)
	RequestId *string `json:"request_id,omitempty"`
}

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

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

// GetError returns the Error field value if set, zero value otherwise.
func (o *CompleteDirectUpload404Response) GetError() string {
	if o == nil || IsNil(o.Error) {
		var ret string
		return ret
	}
	return *o.Error
}

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

// HasError returns a boolean if a field has been set.
func (o *CompleteDirectUpload404Response) HasError() bool {
	if o != nil && !IsNil(o.Error) {
		return true
	}

	return false
}

// SetError gets a reference to the given string and assigns it to the Error field.
func (o *CompleteDirectUpload404Response) SetError(v string) {
	o.Error = &v
}

// GetRequestId returns the RequestId field value if set, zero value otherwise.
func (o *CompleteDirectUpload404Response) GetRequestId() string {
	if o == nil || IsNil(o.RequestId) {
		var ret string
		return ret
	}
	return *o.RequestId
}

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

// HasRequestId returns a boolean if a field has been set.
func (o *CompleteDirectUpload404Response) HasRequestId() bool {
	if o != nil && !IsNil(o.RequestId) {
		return true
	}

	return false
}

// SetRequestId gets a reference to the given string and assigns it to the RequestId field.
func (o *CompleteDirectUpload404Response) SetRequestId(v string) {
	o.RequestId = &v
}

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

func (o CompleteDirectUpload404Response) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Error) {
		toSerialize["error"] = o.Error
	}
	if !IsNil(o.RequestId) {
		toSerialize["request_id"] = o.RequestId
	}
	return toSerialize, nil
}

type NullableCompleteDirectUpload404Response struct {
	value *CompleteDirectUpload404Response
	isSet bool
}

func (v NullableCompleteDirectUpload404Response) Get() *CompleteDirectUpload404Response {
	return v.value
}

func (v *NullableCompleteDirectUpload404Response) Set(val *CompleteDirectUpload404Response) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableCompleteDirectUpload404Response(val *CompleteDirectUpload404Response) *NullableCompleteDirectUpload404Response {
	return &NullableCompleteDirectUpload404Response{value: val, isSet: true}
}

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

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


