/*
 * 3DS OUTSCALE API
 *
 * Welcome to the OUTSCALE API documentation.<br /> The OUTSCALE API enables you to manage your resources in the OUTSCALE Cloud. This documentation describes the different actions available along with code examples.<br /><br /> Throttling: To protect against overloads, the number of identical requests allowed in a given time period is limited.<br /> Brute force: To protect against brute force attacks, the number of failed authentication attempts in a given time period is limited.<br /><br /> Note that the OUTSCALE Cloud is compatible with Amazon Web Services (AWS) APIs, but there are [differences in resource names](https://docs.outscale.com/en/userguide/About-the-APIs.html) between AWS and the OUTSCALE API.<br /> You can also manage your resources using the [Cockpit](https://docs.outscale.com/en/userguide/About-Cockpit.html) web interface.<br /><br /> An OpenAPI description of this API is also available for download: <button>[GitHub repository](https://github.com/outscale/osc-api)</button><br /> # Authentication Schemes ### Access Key/Secret Key The main way to authenticate your requests to the OUTSCALE API is to use an access key and a secret key.<br /> The mechanism behind this is based on AWS Signature Version 4, whose technical implementation details are described in [Signature of API Requests](https://docs.outscale.com/en/userguide/Signature-of-API-Requests.html).<br /><br /> In practice, the way to specify your access key and secret key depends on the tool or SDK you want to use to interact with the API.<br />  > For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify your access key, secret key, and the Region of your account. > 2. You then specify the `--profile` option when executing OSC CLI commands. > > For more information, see [Installing and Configuring OSC CLI](https://docs.outscale.com/en/userguide/Installing-and-Configuring-OSC-CLI.html).  See the code samples in each section of this documentation for specific examples in different programming languages.<br /> For more information about access keys, see [About Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html).  > If you try to sign requests with an invalid access key four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes.  ### Login/Password For certain API actions, you can also use basic authentication with the login (email address) and password of your OUTSCALE account.<br /> This is useful only in special circumstances, for example if you do not know your access key/secret key and want to retrieve them programmatically.<br /> In most cases, however, you can use the Cockpit web interface to retrieve them.<br />  > For example, if you use OSC CLI: > 1. You need to create an **~/.osc/config.json** file to specify the Region of your account, but you leave the access key value and secret key value empty (`&quot;&quot;`). > 2. You then specify the `--profile`, `--authentication-method`, `--login`, and `--password` options when executing OSC CLI commands.  See the code samples in each section of this documentation for specific examples in different programming languages.  > If you try to sign requests with an invalid password four times in a row, further authentication attempts will be prevented for 1 minute. This lockout time increases 1 minute every four failed attempts, for up to 10 minutes.  ### No Authentication A few API actions do not require any authentication. They are indicated as such in this documentation.<br /> ### Other Security Mechanisms In parallel with the authentication schemes, you can add other security mechanisms to your OUTSCALE account, for example to restrict API requests by IP or other criteria.<br /> For more information, see [Managing Your API Accesses](https://docs.outscale.com/en/userguide/Managing-Your-API-Accesses.html). # Pagination Tutorial You can learn more about the pagination methods for read calls in the dedicated [pagination tutorial](https://docs.outscale.com/en/userguide/Tutorial-Paginating-an-API-Request.html). # Error Codes Reference You can learn more about errors returned by the API in the dedicated [errors page](api-errors.html).
 *
 * API version: 1.41.0
 * Contact: support@outscale.com
 */

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

package osc

import (
	"encoding/json"
)

// VmType Information about the VM type.
type VmType struct {
	// This parameter is not available. It is present in our API for the sake of historical compatibility with AWS.
	BsuOptimized *bool `json:"BsuOptimized,omitempty"`
	// The type of ephemeral storage disk.
	EphemeralsType *string `json:"EphemeralsType,omitempty"`
	// The number of Ethernet interface available.
	Eth *int32 `json:"Eth,omitempty"`
	// The number of GPU available.
	Gpu *int32 `json:"Gpu,omitempty"`
	// The maximum number of private IPs per network interface card (NIC).
	MaxPrivateIps *int32 `json:"MaxPrivateIps,omitempty"`
	// The amount of memory, in gibibytes.
	MemorySize *float32 `json:"MemorySize,omitempty"`
	// The number of vCores.
	VcoreCount *int32 `json:"VcoreCount,omitempty"`
	// The name of the VM type.
	VmTypeName *string `json:"VmTypeName,omitempty"`
	// The maximum number of ephemeral storage disks.
	VolumeCount *int32 `json:"VolumeCount,omitempty"`
	// The size of one ephemeral storage disk, in gibibytes (GiB).
	VolumeSize *int32 `json:"VolumeSize,omitempty"`
}

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

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

// GetBsuOptimized returns the BsuOptimized field value if set, zero value otherwise.
func (o *VmType) GetBsuOptimized() bool {
	if o == nil || o.BsuOptimized == nil {
		var ret bool
		return ret
	}
	return *o.BsuOptimized
}

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

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

	return false
}

// SetBsuOptimized gets a reference to the given bool and assigns it to the BsuOptimized field.
func (o *VmType) SetBsuOptimized(v bool) {
	o.BsuOptimized = &v
}

// GetEphemeralsType returns the EphemeralsType field value if set, zero value otherwise.
func (o *VmType) GetEphemeralsType() string {
	if o == nil || o.EphemeralsType == nil {
		var ret string
		return ret
	}
	return *o.EphemeralsType
}

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

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

	return false
}

// SetEphemeralsType gets a reference to the given string and assigns it to the EphemeralsType field.
func (o *VmType) SetEphemeralsType(v string) {
	o.EphemeralsType = &v
}

// GetEth returns the Eth field value if set, zero value otherwise.
func (o *VmType) GetEth() int32 {
	if o == nil || o.Eth == nil {
		var ret int32
		return ret
	}
	return *o.Eth
}

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

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

	return false
}

// SetEth gets a reference to the given int32 and assigns it to the Eth field.
func (o *VmType) SetEth(v int32) {
	o.Eth = &v
}

// GetGpu returns the Gpu field value if set, zero value otherwise.
func (o *VmType) GetGpu() int32 {
	if o == nil || o.Gpu == nil {
		var ret int32
		return ret
	}
	return *o.Gpu
}

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

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

	return false
}

// SetGpu gets a reference to the given int32 and assigns it to the Gpu field.
func (o *VmType) SetGpu(v int32) {
	o.Gpu = &v
}

// GetMaxPrivateIps returns the MaxPrivateIps field value if set, zero value otherwise.
func (o *VmType) GetMaxPrivateIps() int32 {
	if o == nil || o.MaxPrivateIps == nil {
		var ret int32
		return ret
	}
	return *o.MaxPrivateIps
}

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

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

	return false
}

// SetMaxPrivateIps gets a reference to the given int32 and assigns it to the MaxPrivateIps field.
func (o *VmType) SetMaxPrivateIps(v int32) {
	o.MaxPrivateIps = &v
}

// GetMemorySize returns the MemorySize field value if set, zero value otherwise.
func (o *VmType) GetMemorySize() float32 {
	if o == nil || o.MemorySize == nil {
		var ret float32
		return ret
	}
	return *o.MemorySize
}

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

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

	return false
}

// SetMemorySize gets a reference to the given float32 and assigns it to the MemorySize field.
func (o *VmType) SetMemorySize(v float32) {
	o.MemorySize = &v
}

// GetVcoreCount returns the VcoreCount field value if set, zero value otherwise.
func (o *VmType) GetVcoreCount() int32 {
	if o == nil || o.VcoreCount == nil {
		var ret int32
		return ret
	}
	return *o.VcoreCount
}

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

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

	return false
}

// SetVcoreCount gets a reference to the given int32 and assigns it to the VcoreCount field.
func (o *VmType) SetVcoreCount(v int32) {
	o.VcoreCount = &v
}

// GetVmTypeName returns the VmTypeName field value if set, zero value otherwise.
func (o *VmType) GetVmTypeName() string {
	if o == nil || o.VmTypeName == nil {
		var ret string
		return ret
	}
	return *o.VmTypeName
}

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

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

	return false
}

// SetVmTypeName gets a reference to the given string and assigns it to the VmTypeName field.
func (o *VmType) SetVmTypeName(v string) {
	o.VmTypeName = &v
}

// GetVolumeCount returns the VolumeCount field value if set, zero value otherwise.
func (o *VmType) GetVolumeCount() int32 {
	if o == nil || o.VolumeCount == nil {
		var ret int32
		return ret
	}
	return *o.VolumeCount
}

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

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

	return false
}

// SetVolumeCount gets a reference to the given int32 and assigns it to the VolumeCount field.
func (o *VmType) SetVolumeCount(v int32) {
	o.VolumeCount = &v
}

// GetVolumeSize returns the VolumeSize field value if set, zero value otherwise.
func (o *VmType) GetVolumeSize() int32 {
	if o == nil || o.VolumeSize == nil {
		var ret int32
		return ret
	}
	return *o.VolumeSize
}

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

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

	return false
}

// SetVolumeSize gets a reference to the given int32 and assigns it to the VolumeSize field.
func (o *VmType) SetVolumeSize(v int32) {
	o.VolumeSize = &v
}

func (o VmType) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.BsuOptimized != nil {
		toSerialize["BsuOptimized"] = o.BsuOptimized
	}
	if o.EphemeralsType != nil {
		toSerialize["EphemeralsType"] = o.EphemeralsType
	}
	if o.Eth != nil {
		toSerialize["Eth"] = o.Eth
	}
	if o.Gpu != nil {
		toSerialize["Gpu"] = o.Gpu
	}
	if o.MaxPrivateIps != nil {
		toSerialize["MaxPrivateIps"] = o.MaxPrivateIps
	}
	if o.MemorySize != nil {
		toSerialize["MemorySize"] = o.MemorySize
	}
	if o.VcoreCount != nil {
		toSerialize["VcoreCount"] = o.VcoreCount
	}
	if o.VmTypeName != nil {
		toSerialize["VmTypeName"] = o.VmTypeName
	}
	if o.VolumeCount != nil {
		toSerialize["VolumeCount"] = o.VolumeCount
	}
	if o.VolumeSize != nil {
		toSerialize["VolumeSize"] = o.VolumeSize
	}
	return json.Marshal(toSerialize)
}

type NullableVmType struct {
	value *VmType
	isSet bool
}

func (v NullableVmType) Get() *VmType {
	return v.value
}

func (v *NullableVmType) Set(val *VmType) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableVmType(val *VmType) *NullableVmType {
	return &NullableVmType{value: val, isSet: true}
}

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

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