/*
 * 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"
)

// DirectLinkInterfaces Information about the DirectLink interfaces.
type DirectLinkInterfaces struct {
	// The OUTSCALE account ID of the owner of the DirectLink interface.
	AccountId *string `json:"AccountId,omitempty"`
	// The BGP (Border Gateway Protocol) ASN (Autonomous System Number) on the customer's side of the DirectLink interface.
	BgpAsn *int32 `json:"BgpAsn,omitempty"`
	// The BGP authentication key.
	BgpKey *string `json:"BgpKey,omitempty"`
	// The IP on the customer's side of the DirectLink interface.
	ClientPrivateIp *string `json:"ClientPrivateIp,omitempty"`
	// The ID of the DirectLink.
	DirectLinkId *string `json:"DirectLinkId,omitempty"`
	// The ID of the DirectLink interface.
	DirectLinkInterfaceId *string `json:"DirectLinkInterfaceId,omitempty"`
	// The name of the DirectLink interface.
	DirectLinkInterfaceName *string `json:"DirectLinkInterfaceName,omitempty"`
	// The type of the DirectLink interface (always `private`).
	InterfaceType *string `json:"InterfaceType,omitempty"`
	// The datacenter where the DirectLink interface is located.
	Location *string `json:"Location,omitempty"`
	// The maximum transmission unit (MTU) of the DirectLink interface, in bytes.
	Mtu *int32 `json:"Mtu,omitempty"`
	// The IP on the OUTSCALE side of the DirectLink interface.
	OutscalePrivateIp *string `json:"OutscalePrivateIp,omitempty"`
	// The state of the DirectLink interface (`pending` \\| `available` \\| `deleting` \\| `deleted` \\| `confirming` \\| `rejected` \\| `expired`).
	State *string `json:"State,omitempty"`
	// The ID of the target virtual gateway.
	VirtualGatewayId *string `json:"VirtualGatewayId,omitempty"`
	// The VLAN number associated with the DirectLink interface.
	Vlan *int32 `json:"Vlan,omitempty"`
}

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

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

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

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

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

	return false
}

// SetAccountId gets a reference to the given string and assigns it to the AccountId field.
func (o *DirectLinkInterfaces) SetAccountId(v string) {
	o.AccountId = &v
}

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

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

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

	return false
}

// SetBgpAsn gets a reference to the given int32 and assigns it to the BgpAsn field.
func (o *DirectLinkInterfaces) SetBgpAsn(v int32) {
	o.BgpAsn = &v
}

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

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

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

	return false
}

// SetBgpKey gets a reference to the given string and assigns it to the BgpKey field.
func (o *DirectLinkInterfaces) SetBgpKey(v string) {
	o.BgpKey = &v
}

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

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

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

	return false
}

// SetClientPrivateIp gets a reference to the given string and assigns it to the ClientPrivateIp field.
func (o *DirectLinkInterfaces) SetClientPrivateIp(v string) {
	o.ClientPrivateIp = &v
}

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

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

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

	return false
}

// SetDirectLinkId gets a reference to the given string and assigns it to the DirectLinkId field.
func (o *DirectLinkInterfaces) SetDirectLinkId(v string) {
	o.DirectLinkId = &v
}

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

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

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

	return false
}

// SetDirectLinkInterfaceId gets a reference to the given string and assigns it to the DirectLinkInterfaceId field.
func (o *DirectLinkInterfaces) SetDirectLinkInterfaceId(v string) {
	o.DirectLinkInterfaceId = &v
}

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

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

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

	return false
}

// SetDirectLinkInterfaceName gets a reference to the given string and assigns it to the DirectLinkInterfaceName field.
func (o *DirectLinkInterfaces) SetDirectLinkInterfaceName(v string) {
	o.DirectLinkInterfaceName = &v
}

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

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

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

	return false
}

// SetInterfaceType gets a reference to the given string and assigns it to the InterfaceType field.
func (o *DirectLinkInterfaces) SetInterfaceType(v string) {
	o.InterfaceType = &v
}

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

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

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

	return false
}

// SetLocation gets a reference to the given string and assigns it to the Location field.
func (o *DirectLinkInterfaces) SetLocation(v string) {
	o.Location = &v
}

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

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

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

	return false
}

// SetMtu gets a reference to the given int32 and assigns it to the Mtu field.
func (o *DirectLinkInterfaces) SetMtu(v int32) {
	o.Mtu = &v
}

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

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

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

	return false
}

// SetOutscalePrivateIp gets a reference to the given string and assigns it to the OutscalePrivateIp field.
func (o *DirectLinkInterfaces) SetOutscalePrivateIp(v string) {
	o.OutscalePrivateIp = &v
}

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

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

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

	return false
}

// SetState gets a reference to the given string and assigns it to the State field.
func (o *DirectLinkInterfaces) SetState(v string) {
	o.State = &v
}

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

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

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

	return false
}

// SetVirtualGatewayId gets a reference to the given string and assigns it to the VirtualGatewayId field.
func (o *DirectLinkInterfaces) SetVirtualGatewayId(v string) {
	o.VirtualGatewayId = &v
}

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

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

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

	return false
}

// SetVlan gets a reference to the given int32 and assigns it to the Vlan field.
func (o *DirectLinkInterfaces) SetVlan(v int32) {
	o.Vlan = &v
}

func (o DirectLinkInterfaces) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.AccountId != nil {
		toSerialize["AccountId"] = o.AccountId
	}
	if o.BgpAsn != nil {
		toSerialize["BgpAsn"] = o.BgpAsn
	}
	if o.BgpKey != nil {
		toSerialize["BgpKey"] = o.BgpKey
	}
	if o.ClientPrivateIp != nil {
		toSerialize["ClientPrivateIp"] = o.ClientPrivateIp
	}
	if o.DirectLinkId != nil {
		toSerialize["DirectLinkId"] = o.DirectLinkId
	}
	if o.DirectLinkInterfaceId != nil {
		toSerialize["DirectLinkInterfaceId"] = o.DirectLinkInterfaceId
	}
	if o.DirectLinkInterfaceName != nil {
		toSerialize["DirectLinkInterfaceName"] = o.DirectLinkInterfaceName
	}
	if o.InterfaceType != nil {
		toSerialize["InterfaceType"] = o.InterfaceType
	}
	if o.Location != nil {
		toSerialize["Location"] = o.Location
	}
	if o.Mtu != nil {
		toSerialize["Mtu"] = o.Mtu
	}
	if o.OutscalePrivateIp != nil {
		toSerialize["OutscalePrivateIp"] = o.OutscalePrivateIp
	}
	if o.State != nil {
		toSerialize["State"] = o.State
	}
	if o.VirtualGatewayId != nil {
		toSerialize["VirtualGatewayId"] = o.VirtualGatewayId
	}
	if o.Vlan != nil {
		toSerialize["Vlan"] = o.Vlan
	}
	return json.Marshal(toSerialize)
}

type NullableDirectLinkInterfaces struct {
	value *DirectLinkInterfaces
	isSet bool
}

func (v NullableDirectLinkInterfaces) Get() *DirectLinkInterfaces {
	return v.value
}

func (v *NullableDirectLinkInterfaces) Set(val *DirectLinkInterfaces) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableDirectLinkInterfaces(val *DirectLinkInterfaces) *NullableDirectLinkInterfaces {
	return &NullableDirectLinkInterfaces{value: val, isSet: true}
}

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

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