/*
Digital Certificates API

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

API version: 2.0.0
*/

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

package digital_certificates

import (
	"encoding/json"
)

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

// UpdateDigitalCertificateRequest struct for UpdateDigitalCertificateRequest
type UpdateDigitalCertificateRequest struct {
	Name *string `json:"name,omitempty"`
	Certificate *string `json:"certificate,omitempty"`
	PrivateKey *string `json:"private_key,omitempty"`
	CertificateType *string `json:"certificate_type,omitempty"`
	Managed *bool `json:"managed,omitempty"`
}

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

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

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

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

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

	return false
}

// SetName gets a reference to the given string and assigns it to the Name field.
func (o *UpdateDigitalCertificateRequest) SetName(v string) {
	o.Name = &v
}

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

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

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

	return false
}

// SetCertificate gets a reference to the given string and assigns it to the Certificate field.
func (o *UpdateDigitalCertificateRequest) SetCertificate(v string) {
	o.Certificate = &v
}

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

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

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

	return false
}

// SetPrivateKey gets a reference to the given string and assigns it to the PrivateKey field.
func (o *UpdateDigitalCertificateRequest) SetPrivateKey(v string) {
	o.PrivateKey = &v
}

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

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

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

	return false
}

// SetCertificateType gets a reference to the given string and assigns it to the CertificateType field.
func (o *UpdateDigitalCertificateRequest) SetCertificateType(v string) {
	o.CertificateType = &v
}

// GetManaged returns the Managed field value if set, zero value otherwise.
func (o *UpdateDigitalCertificateRequest) GetManaged() bool {
	if o == nil || IsNil(o.Managed) {
		var ret bool
		return ret
	}
	return *o.Managed
}

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

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

	return false
}

// SetManaged gets a reference to the given bool and assigns it to the Managed field.
func (o *UpdateDigitalCertificateRequest) SetManaged(v bool) {
	o.Managed = &v
}

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

func (o UpdateDigitalCertificateRequest) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Name) {
		toSerialize["name"] = o.Name
	}
	if !IsNil(o.Certificate) {
		toSerialize["certificate"] = o.Certificate
	}
	if !IsNil(o.PrivateKey) {
		toSerialize["private_key"] = o.PrivateKey
	}
	if !IsNil(o.CertificateType) {
		toSerialize["certificate_type"] = o.CertificateType
	}
	if !IsNil(o.Managed) {
		toSerialize["managed"] = o.Managed
	}
	return toSerialize, nil
}

type NullableUpdateDigitalCertificateRequest struct {
	value *UpdateDigitalCertificateRequest
	isSet bool
}

func (v NullableUpdateDigitalCertificateRequest) Get() *UpdateDigitalCertificateRequest {
	return v.value
}

func (v *NullableUpdateDigitalCertificateRequest) Set(val *UpdateDigitalCertificateRequest) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableUpdateDigitalCertificateRequest(val *UpdateDigitalCertificateRequest) *NullableUpdateDigitalCertificateRequest {
	return &NullableUpdateDigitalCertificateRequest{value: val, isSet: true}
}

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

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


