/*
 * CLOUD API
 *
 *  IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool.    Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on.
 *
 * API version: 6.0
 */

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

package ionoscloud

import (
	"encoding/json"
)

// DatacenterPropertiesPut struct for DatacenterPropertiesPut
type DatacenterPropertiesPut struct {
	// The name of the  resource.
	Name *string `json:"name,omitempty"`
	// A description for the datacenter, such as staging, production.
	Description *string `json:"description,omitempty"`
	// The physical location where the datacenter will be created. This will be where all of your servers live. Property cannot be modified after datacenter creation (disallowed in update requests).
	Location *string `json:"location,omitempty"`
	// The version of the data center; incremented with every change.
	Version *int32 `json:"version,omitempty"`
	// List of features supported by the location where this data center is provisioned.
	Features *[]string `json:"features,omitempty"`
	// Boolean value representing if the data center requires extra protection, such as two-step verification.
	SecAuthProtection *bool `json:"secAuthProtection,omitempty"`
	// Array of features and CPU families available in a location
	CpuArchitecture *[]CpuArchitectureProperties `json:"cpuArchitecture,omitempty"`
	// This will become the default security group for the datacenter, replacing the old one if already exists.  This security group must already exists prior to this request. Provide this field only if the `createDefaultSecurityGroup` field is missing. You cannot provide both of them
	DefaultSecurityGroupId *string `json:"defaultSecurityGroupId,omitempty"`
	// If this field is set on true and this datacenter has no default security group then a default security group, with predefined rules, will be created for this datacenter. Default value is false.  Provide this field only if the `defaultSecurityGroupId` field is missing. You cannot provide both of them
	CreateDefaultSecurityGroup *bool `json:"createDefaultSecurityGroup,omitempty"`
}

// NewDatacenterPropertiesPut instantiates a new DatacenterPropertiesPut 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 NewDatacenterPropertiesPut() *DatacenterPropertiesPut {
	this := DatacenterPropertiesPut{}

	return &this
}

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

// GetName returns the Name field value
// If the value is explicit nil, nil is returned
func (o *DatacenterPropertiesPut) GetName() *string {
	if o == nil {
		return nil
	}

	return o.Name

}

// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *DatacenterPropertiesPut) GetNameOk() (*string, bool) {
	if o == nil {
		return nil, false
	}

	return o.Name, true
}

// SetName sets field value
func (o *DatacenterPropertiesPut) SetName(v string) {

	o.Name = &v

}

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

	return false
}

// GetDescription returns the Description field value
// If the value is explicit nil, nil is returned
func (o *DatacenterPropertiesPut) GetDescription() *string {
	if o == nil {
		return nil
	}

	return o.Description

}

// GetDescriptionOk returns a tuple with the Description field value
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *DatacenterPropertiesPut) GetDescriptionOk() (*string, bool) {
	if o == nil {
		return nil, false
	}

	return o.Description, true
}

// SetDescription sets field value
func (o *DatacenterPropertiesPut) SetDescription(v string) {

	o.Description = &v

}

// HasDescription returns a boolean if a field has been set.
func (o *DatacenterPropertiesPut) HasDescription() bool {
	if o != nil && o.Description != nil {
		return true
	}

	return false
}

// GetLocation returns the Location field value
// If the value is explicit nil, nil is returned
func (o *DatacenterPropertiesPut) GetLocation() *string {
	if o == nil {
		return nil
	}

	return o.Location

}

// GetLocationOk returns a tuple with the Location field value
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *DatacenterPropertiesPut) GetLocationOk() (*string, bool) {
	if o == nil {
		return nil, false
	}

	return o.Location, true
}

// SetLocation sets field value
func (o *DatacenterPropertiesPut) SetLocation(v string) {

	o.Location = &v

}

// HasLocation returns a boolean if a field has been set.
func (o *DatacenterPropertiesPut) HasLocation() bool {
	if o != nil && o.Location != nil {
		return true
	}

	return false
}

// GetVersion returns the Version field value
// If the value is explicit nil, nil is returned
func (o *DatacenterPropertiesPut) GetVersion() *int32 {
	if o == nil {
		return nil
	}

	return o.Version

}

// GetVersionOk returns a tuple with the Version field value
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *DatacenterPropertiesPut) GetVersionOk() (*int32, bool) {
	if o == nil {
		return nil, false
	}

	return o.Version, true
}

// SetVersion sets field value
func (o *DatacenterPropertiesPut) SetVersion(v int32) {

	o.Version = &v

}

// HasVersion returns a boolean if a field has been set.
func (o *DatacenterPropertiesPut) HasVersion() bool {
	if o != nil && o.Version != nil {
		return true
	}

	return false
}

// GetFeatures returns the Features field value
// If the value is explicit nil, nil is returned
func (o *DatacenterPropertiesPut) GetFeatures() *[]string {
	if o == nil {
		return nil
	}

	return o.Features

}

// GetFeaturesOk returns a tuple with the Features field value
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *DatacenterPropertiesPut) GetFeaturesOk() (*[]string, bool) {
	if o == nil {
		return nil, false
	}

	return o.Features, true
}

// SetFeatures sets field value
func (o *DatacenterPropertiesPut) SetFeatures(v []string) {

	o.Features = &v

}

// HasFeatures returns a boolean if a field has been set.
func (o *DatacenterPropertiesPut) HasFeatures() bool {
	if o != nil && o.Features != nil {
		return true
	}

	return false
}

// GetSecAuthProtection returns the SecAuthProtection field value
// If the value is explicit nil, nil is returned
func (o *DatacenterPropertiesPut) GetSecAuthProtection() *bool {
	if o == nil {
		return nil
	}

	return o.SecAuthProtection

}

// GetSecAuthProtectionOk returns a tuple with the SecAuthProtection field value
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *DatacenterPropertiesPut) GetSecAuthProtectionOk() (*bool, bool) {
	if o == nil {
		return nil, false
	}

	return o.SecAuthProtection, true
}

// SetSecAuthProtection sets field value
func (o *DatacenterPropertiesPut) SetSecAuthProtection(v bool) {

	o.SecAuthProtection = &v

}

// HasSecAuthProtection returns a boolean if a field has been set.
func (o *DatacenterPropertiesPut) HasSecAuthProtection() bool {
	if o != nil && o.SecAuthProtection != nil {
		return true
	}

	return false
}

// GetCpuArchitecture returns the CpuArchitecture field value
// If the value is explicit nil, nil is returned
func (o *DatacenterPropertiesPut) GetCpuArchitecture() *[]CpuArchitectureProperties {
	if o == nil {
		return nil
	}

	return o.CpuArchitecture

}

// GetCpuArchitectureOk returns a tuple with the CpuArchitecture field value
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *DatacenterPropertiesPut) GetCpuArchitectureOk() (*[]CpuArchitectureProperties, bool) {
	if o == nil {
		return nil, false
	}

	return o.CpuArchitecture, true
}

// SetCpuArchitecture sets field value
func (o *DatacenterPropertiesPut) SetCpuArchitecture(v []CpuArchitectureProperties) {

	o.CpuArchitecture = &v

}

// HasCpuArchitecture returns a boolean if a field has been set.
func (o *DatacenterPropertiesPut) HasCpuArchitecture() bool {
	if o != nil && o.CpuArchitecture != nil {
		return true
	}

	return false
}

// GetDefaultSecurityGroupId returns the DefaultSecurityGroupId field value
// If the value is explicit nil, nil is returned
func (o *DatacenterPropertiesPut) GetDefaultSecurityGroupId() *string {
	if o == nil {
		return nil
	}

	return o.DefaultSecurityGroupId

}

// GetDefaultSecurityGroupIdOk returns a tuple with the DefaultSecurityGroupId field value
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *DatacenterPropertiesPut) GetDefaultSecurityGroupIdOk() (*string, bool) {
	if o == nil {
		return nil, false
	}

	return o.DefaultSecurityGroupId, true
}

// SetDefaultSecurityGroupId sets field value
func (o *DatacenterPropertiesPut) SetDefaultSecurityGroupId(v string) {

	o.DefaultSecurityGroupId = &v

}

// HasDefaultSecurityGroupId returns a boolean if a field has been set.
func (o *DatacenterPropertiesPut) HasDefaultSecurityGroupId() bool {
	if o != nil && o.DefaultSecurityGroupId != nil {
		return true
	}

	return false
}

// GetCreateDefaultSecurityGroup returns the CreateDefaultSecurityGroup field value
// If the value is explicit nil, nil is returned
func (o *DatacenterPropertiesPut) GetCreateDefaultSecurityGroup() *bool {
	if o == nil {
		return nil
	}

	return o.CreateDefaultSecurityGroup

}

// GetCreateDefaultSecurityGroupOk returns a tuple with the CreateDefaultSecurityGroup field value
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *DatacenterPropertiesPut) GetCreateDefaultSecurityGroupOk() (*bool, bool) {
	if o == nil {
		return nil, false
	}

	return o.CreateDefaultSecurityGroup, true
}

// SetCreateDefaultSecurityGroup sets field value
func (o *DatacenterPropertiesPut) SetCreateDefaultSecurityGroup(v bool) {

	o.CreateDefaultSecurityGroup = &v

}

// HasCreateDefaultSecurityGroup returns a boolean if a field has been set.
func (o *DatacenterPropertiesPut) HasCreateDefaultSecurityGroup() bool {
	if o != nil && o.CreateDefaultSecurityGroup != nil {
		return true
	}

	return false
}

func (o DatacenterPropertiesPut) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.Name != nil {
		toSerialize["name"] = o.Name
	}

	if o.Description != nil {
		toSerialize["description"] = o.Description
	}

	if o.Location != nil {
		toSerialize["location"] = o.Location
	}

	if o.Version != nil {
		toSerialize["version"] = o.Version
	}

	if o.Features != nil {
		toSerialize["features"] = o.Features
	}

	if o.SecAuthProtection != nil {
		toSerialize["secAuthProtection"] = o.SecAuthProtection
	}

	if o.CpuArchitecture != nil {
		toSerialize["cpuArchitecture"] = o.CpuArchitecture
	}

	if o.DefaultSecurityGroupId != nil {
		toSerialize["defaultSecurityGroupId"] = o.DefaultSecurityGroupId
	}

	if o.CreateDefaultSecurityGroup != nil {
		toSerialize["createDefaultSecurityGroup"] = o.CreateDefaultSecurityGroup
	}

	return json.Marshal(toSerialize)
}

type NullableDatacenterPropertiesPut struct {
	value *DatacenterPropertiesPut
	isSet bool
}

func (v NullableDatacenterPropertiesPut) Get() *DatacenterPropertiesPut {
	return v.value
}

func (v *NullableDatacenterPropertiesPut) Set(val *DatacenterPropertiesPut) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableDatacenterPropertiesPut(val *DatacenterPropertiesPut) *NullableDatacenterPropertiesPut {
	return &NullableDatacenterPropertiesPut{value: val, isSet: true}
}

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

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