/*
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 NewConfigurationDeploymentResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &NewConfigurationDeploymentResponse{}

// NewConfigurationDeploymentResponse struct for NewConfigurationDeploymentResponse
type NewConfigurationDeploymentResponse struct {
	// Deployment ID
	DeploymentId *string `json:"deployment_id,omitempty"`
	AdditionalProperties map[string]interface{}
}

type _NewConfigurationDeploymentResponse NewConfigurationDeploymentResponse

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

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

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

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

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

	return false
}

// SetDeploymentId gets a reference to the given string and assigns it to the DeploymentId field.
func (o *NewConfigurationDeploymentResponse) SetDeploymentId(v string) {
	o.DeploymentId = &v
}

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

func (o NewConfigurationDeploymentResponse) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.DeploymentId) {
		toSerialize["deployment_id"] = o.DeploymentId
	}

	for key, value := range o.AdditionalProperties {
		toSerialize[key] = value
	}

	return toSerialize, nil
}

func (o *NewConfigurationDeploymentResponse) UnmarshalJSON(data []byte) (err error) {
	varNewConfigurationDeploymentResponse := _NewConfigurationDeploymentResponse{}

	err = json.Unmarshal(data, &varNewConfigurationDeploymentResponse)

	if err != nil {
		return err
	}

	*o = NewConfigurationDeploymentResponse(varNewConfigurationDeploymentResponse)

	additionalProperties := make(map[string]interface{})

	if err = json.Unmarshal(data, &additionalProperties); err == nil {
		delete(additionalProperties, "deployment_id")
		o.AdditionalProperties = additionalProperties
	}

	return err
}

type NullableNewConfigurationDeploymentResponse struct {
	value *NewConfigurationDeploymentResponse
	isSet bool
}

func (v NullableNewConfigurationDeploymentResponse) Get() *NewConfigurationDeploymentResponse {
	return v.value
}

func (v *NullableNewConfigurationDeploymentResponse) Set(val *NewConfigurationDeploymentResponse) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableNewConfigurationDeploymentResponse(val *NewConfigurationDeploymentResponse) *NullableNewConfigurationDeploymentResponse {
	return &NullableNewConfigurationDeploymentResponse{value: val, isSet: true}
}

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

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


