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	"encoding/json"
17	"github.com/oracle/oci-go-sdk/common"
18)
19
20// IScsiVolumeAttachment An ISCSI volume attachment.
21type IScsiVolumeAttachment struct {
22
23	// The availability domain of an instance.
24	// Example: `Uocm:PHX-AD-1`
25	AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"`
26
27	// The OCID of the compartment.
28	CompartmentId *string `mandatory:"true" json:"compartmentId"`
29
30	// The OCID of the volume attachment.
31	Id *string `mandatory:"true" json:"id"`
32
33	// The OCID of the instance the volume is attached to.
34	InstanceId *string `mandatory:"true" json:"instanceId"`
35
36	// The date and time the volume was created, in the format defined by RFC3339.
37	// Example: `2016-08-25T21:10:29.600Z`
38	TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"`
39
40	// The OCID of the volume.
41	VolumeId *string `mandatory:"true" json:"volumeId"`
42
43	// The volume's iSCSI IP address.
44	// Example: `169.254.0.2`
45	Ipv4 *string `mandatory:"true" json:"ipv4"`
46
47	// The target volume's iSCSI Qualified Name in the format defined by RFC 3720.
48	// Example: `iqn.2015-12.us.oracle.com:456b0391-17b8-4122-bbf1-f85fc0bb97d9`
49	Iqn *string `mandatory:"true" json:"iqn"`
50
51	// The volume's iSCSI port.
52	// Example: `3260`
53	Port *int `mandatory:"true" json:"port"`
54
55	// The device name.
56	Device *string `mandatory:"false" json:"device"`
57
58	// A user-friendly name. Does not have to be unique, and it cannot be changed.
59	// Avoid entering confidential information.
60	// Example: `My volume attachment`
61	DisplayName *string `mandatory:"false" json:"displayName"`
62
63	// Whether the attachment was created in read-only mode.
64	IsReadOnly *bool `mandatory:"false" json:"isReadOnly"`
65
66	// Whether in-transit encryption for the data volume's paravirtualized attachment is enabled or not.
67	IsPvEncryptionInTransitEnabled *bool `mandatory:"false" json:"isPvEncryptionInTransitEnabled"`
68
69	// The Challenge-Handshake-Authentication-Protocol (CHAP) secret valid for the associated CHAP user name.
70	// (Also called the "CHAP password".)
71	// Example: `d6866c0d-298b-48ba-95af-309b4faux45e`
72	ChapSecret *string `mandatory:"false" json:"chapSecret"`
73
74	// The volume's system-generated Challenge-Handshake-Authentication-Protocol (CHAP) user name.
75	// Example: `ocid1.volume.oc1.phx.abyhqljrgvttnlx73nmrwfaux7kcvzfs3s66izvxf2h4lgvyndsdsnoiwr5q`
76	ChapUsername *string `mandatory:"false" json:"chapUsername"`
77
78	// The current state of the volume attachment.
79	LifecycleState VolumeAttachmentLifecycleStateEnum `mandatory:"true" json:"lifecycleState"`
80}
81
82//GetAvailabilityDomain returns AvailabilityDomain
83func (m IScsiVolumeAttachment) GetAvailabilityDomain() *string {
84	return m.AvailabilityDomain
85}
86
87//GetCompartmentId returns CompartmentId
88func (m IScsiVolumeAttachment) GetCompartmentId() *string {
89	return m.CompartmentId
90}
91
92//GetDevice returns Device
93func (m IScsiVolumeAttachment) GetDevice() *string {
94	return m.Device
95}
96
97//GetDisplayName returns DisplayName
98func (m IScsiVolumeAttachment) GetDisplayName() *string {
99	return m.DisplayName
100}
101
102//GetId returns Id
103func (m IScsiVolumeAttachment) GetId() *string {
104	return m.Id
105}
106
107//GetInstanceId returns InstanceId
108func (m IScsiVolumeAttachment) GetInstanceId() *string {
109	return m.InstanceId
110}
111
112//GetIsReadOnly returns IsReadOnly
113func (m IScsiVolumeAttachment) GetIsReadOnly() *bool {
114	return m.IsReadOnly
115}
116
117//GetLifecycleState returns LifecycleState
118func (m IScsiVolumeAttachment) GetLifecycleState() VolumeAttachmentLifecycleStateEnum {
119	return m.LifecycleState
120}
121
122//GetTimeCreated returns TimeCreated
123func (m IScsiVolumeAttachment) GetTimeCreated() *common.SDKTime {
124	return m.TimeCreated
125}
126
127//GetVolumeId returns VolumeId
128func (m IScsiVolumeAttachment) GetVolumeId() *string {
129	return m.VolumeId
130}
131
132//GetIsPvEncryptionInTransitEnabled returns IsPvEncryptionInTransitEnabled
133func (m IScsiVolumeAttachment) GetIsPvEncryptionInTransitEnabled() *bool {
134	return m.IsPvEncryptionInTransitEnabled
135}
136
137func (m IScsiVolumeAttachment) String() string {
138	return common.PointerString(m)
139}
140
141// MarshalJSON marshals to json representation
142func (m IScsiVolumeAttachment) MarshalJSON() (buff []byte, e error) {
143	type MarshalTypeIScsiVolumeAttachment IScsiVolumeAttachment
144	s := struct {
145		DiscriminatorParam string `json:"attachmentType"`
146		MarshalTypeIScsiVolumeAttachment
147	}{
148		"iscsi",
149		(MarshalTypeIScsiVolumeAttachment)(m),
150	}
151
152	return json.Marshal(&s)
153}
154