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

// DC201 struct for DC201
type DC201 struct {
	Errors []map[string]interface{} `json:"errors,omitempty"`
	SchemaVersion *int32 `json:"schema_version,omitempty"`
}

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

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

// GetErrors returns the Errors field value if set, zero value otherwise.
func (o *DC201) GetErrors() []map[string]interface{} {
	if o == nil || IsNil(o.Errors) {
		var ret []map[string]interface{}
		return ret
	}
	return o.Errors
}

// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DC201) GetErrorsOk() ([]map[string]interface{}, bool) {
	if o == nil || IsNil(o.Errors) {
		return nil, false
	}
	return o.Errors, true
}

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

	return false
}

// SetErrors gets a reference to the given []map[string]interface{} and assigns it to the Errors field.
func (o *DC201) SetErrors(v []map[string]interface{}) {
	o.Errors = v
}

// GetSchemaVersion returns the SchemaVersion field value if set, zero value otherwise.
func (o *DC201) GetSchemaVersion() int32 {
	if o == nil || IsNil(o.SchemaVersion) {
		var ret int32
		return ret
	}
	return *o.SchemaVersion
}

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

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

	return false
}

// SetSchemaVersion gets a reference to the given int32 and assigns it to the SchemaVersion field.
func (o *DC201) SetSchemaVersion(v int32) {
	o.SchemaVersion = &v
}

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

func (o DC201) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Errors) {
		toSerialize["errors"] = o.Errors
	}
	if !IsNil(o.SchemaVersion) {
		toSerialize["schema_version"] = o.SchemaVersion
	}
	return toSerialize, nil
}

type NullableDC201 struct {
	value *DC201
	isSet bool
}

func (v NullableDC201) Get() *DC201 {
	return v.value
}

func (v *NullableDC201) Set(val *DC201) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableDC201(val *DC201) *NullableDC201 {
	return &NullableDC201{value: val, isSet: true}
}

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

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


