1// Copyright (c) 2016, 2018, 2019, Oracle and/or its affiliates. All rights reserved.
2// Code generated. DO NOT EDIT.
3
4// Core Services API
5//
6// API covering the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm),
7// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and
8// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. Use this API
9// to manage resources such as virtual cloud networks (VCNs), compute instances, and
10// block storage volumes.
11//
12
13package core
14
15import (
16	"github.com/oracle/oci-go-sdk/common"
17)
18
19// VnicAttachment Represents an attachment between a VNIC and an instance. For more information, see
20// Virtual Network Interface Cards (VNICs) (https://docs.cloud.oracle.com/Content/Network/Tasks/managingVNICs.htm).
21// **Warning:** Oracle recommends that you avoid using any confidential information when you
22// supply string values using the API.
23type VnicAttachment struct {
24
25	// The availability domain of the instance.
26	// Example: `Uocm:PHX-AD-1`
27	AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"`
28
29	// The OCID of the compartment the VNIC attachment is in, which is the same
30	// compartment the instance is in.
31	CompartmentId *string `mandatory:"true" json:"compartmentId"`
32
33	// The OCID of the VNIC attachment.
34	Id *string `mandatory:"true" json:"id"`
35
36	// The OCID of the instance.
37	InstanceId *string `mandatory:"true" json:"instanceId"`
38
39	// The current state of the VNIC attachment.
40	LifecycleState VnicAttachmentLifecycleStateEnum `mandatory:"true" json:"lifecycleState"`
41
42	// The OCID of the VNIC's subnet.
43	SubnetId *string `mandatory:"true" json:"subnetId"`
44
45	// The date and time the VNIC attachment was created, in the format defined by RFC3339.
46	// Example: `2016-08-25T21:10:29.600Z`
47	TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"`
48
49	// A user-friendly name. Does not have to be unique.
50	// Avoid entering confidential information.
51	DisplayName *string `mandatory:"false" json:"displayName"`
52
53	// Which physical network interface card (NIC) the VNIC uses.
54	// Certain bare metal instance shapes have two active physical NICs (0 and 1). If
55	// you add a secondary VNIC to one of these instances, you can specify which NIC
56	// the VNIC will use. For more information, see
57	// Virtual Network Interface Cards (VNICs) (https://docs.cloud.oracle.com/Content/Network/Tasks/managingVNICs.htm).
58	NicIndex *int `mandatory:"false" json:"nicIndex"`
59
60	// The Oracle-assigned VLAN tag of the attached VNIC. Available after the
61	// attachment process is complete.
62	// Example: `0`
63	VlanTag *int `mandatory:"false" json:"vlanTag"`
64
65	// The OCID of the VNIC. Available after the attachment process is complete.
66	VnicId *string `mandatory:"false" json:"vnicId"`
67}
68
69func (m VnicAttachment) String() string {
70	return common.PointerString(m)
71}
72
73// VnicAttachmentLifecycleStateEnum Enum with underlying type: string
74type VnicAttachmentLifecycleStateEnum string
75
76// Set of constants representing the allowable values for VnicAttachmentLifecycleStateEnum
77const (
78	VnicAttachmentLifecycleStateAttaching VnicAttachmentLifecycleStateEnum = "ATTACHING"
79	VnicAttachmentLifecycleStateAttached  VnicAttachmentLifecycleStateEnum = "ATTACHED"
80	VnicAttachmentLifecycleStateDetaching VnicAttachmentLifecycleStateEnum = "DETACHING"
81	VnicAttachmentLifecycleStateDetached  VnicAttachmentLifecycleStateEnum = "DETACHED"
82)
83
84var mappingVnicAttachmentLifecycleState = map[string]VnicAttachmentLifecycleStateEnum{
85	"ATTACHING": VnicAttachmentLifecycleStateAttaching,
86	"ATTACHED":  VnicAttachmentLifecycleStateAttached,
87	"DETACHING": VnicAttachmentLifecycleStateDetaching,
88	"DETACHED":  VnicAttachmentLifecycleStateDetached,
89}
90
91// GetVnicAttachmentLifecycleStateEnumValues Enumerates the set of values for VnicAttachmentLifecycleStateEnum
92func GetVnicAttachmentLifecycleStateEnumValues() []VnicAttachmentLifecycleStateEnum {
93	values := make([]VnicAttachmentLifecycleStateEnum, 0)
94	for _, v := range mappingVnicAttachmentLifecycleState {
95		values = append(values, v)
96	}
97	return values
98}
99