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// EmulatedVolumeAttachment An Emulated volume attachment.
21type EmulatedVolumeAttachment 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 device name.
44	Device *string `mandatory:"false" json:"device"`
45
46	// A user-friendly name. Does not have to be unique, and it cannot be changed.
47	// Avoid entering confidential information.
48	// Example: `My volume attachment`
49	DisplayName *string `mandatory:"false" json:"displayName"`
50
51	// Whether the attachment was created in read-only mode.
52	IsReadOnly *bool `mandatory:"false" json:"isReadOnly"`
53
54	// Whether in-transit encryption for the data volume's paravirtualized attachment is enabled or not.
55	IsPvEncryptionInTransitEnabled *bool `mandatory:"false" json:"isPvEncryptionInTransitEnabled"`
56
57	// The current state of the volume attachment.
58	LifecycleState VolumeAttachmentLifecycleStateEnum `mandatory:"true" json:"lifecycleState"`
59}
60
61//GetAvailabilityDomain returns AvailabilityDomain
62func (m EmulatedVolumeAttachment) GetAvailabilityDomain() *string {
63	return m.AvailabilityDomain
64}
65
66//GetCompartmentId returns CompartmentId
67func (m EmulatedVolumeAttachment) GetCompartmentId() *string {
68	return m.CompartmentId
69}
70
71//GetDevice returns Device
72func (m EmulatedVolumeAttachment) GetDevice() *string {
73	return m.Device
74}
75
76//GetDisplayName returns DisplayName
77func (m EmulatedVolumeAttachment) GetDisplayName() *string {
78	return m.DisplayName
79}
80
81//GetId returns Id
82func (m EmulatedVolumeAttachment) GetId() *string {
83	return m.Id
84}
85
86//GetInstanceId returns InstanceId
87func (m EmulatedVolumeAttachment) GetInstanceId() *string {
88	return m.InstanceId
89}
90
91//GetIsReadOnly returns IsReadOnly
92func (m EmulatedVolumeAttachment) GetIsReadOnly() *bool {
93	return m.IsReadOnly
94}
95
96//GetLifecycleState returns LifecycleState
97func (m EmulatedVolumeAttachment) GetLifecycleState() VolumeAttachmentLifecycleStateEnum {
98	return m.LifecycleState
99}
100
101//GetTimeCreated returns TimeCreated
102func (m EmulatedVolumeAttachment) GetTimeCreated() *common.SDKTime {
103	return m.TimeCreated
104}
105
106//GetVolumeId returns VolumeId
107func (m EmulatedVolumeAttachment) GetVolumeId() *string {
108	return m.VolumeId
109}
110
111//GetIsPvEncryptionInTransitEnabled returns IsPvEncryptionInTransitEnabled
112func (m EmulatedVolumeAttachment) GetIsPvEncryptionInTransitEnabled() *bool {
113	return m.IsPvEncryptionInTransitEnabled
114}
115
116func (m EmulatedVolumeAttachment) String() string {
117	return common.PointerString(m)
118}
119
120// MarshalJSON marshals to json representation
121func (m EmulatedVolumeAttachment) MarshalJSON() (buff []byte, e error) {
122	type MarshalTypeEmulatedVolumeAttachment EmulatedVolumeAttachment
123	s := struct {
124		DiscriminatorParam string `json:"attachmentType"`
125		MarshalTypeEmulatedVolumeAttachment
126	}{
127		"emulated",
128		(MarshalTypeEmulatedVolumeAttachment)(m),
129	}
130
131	return json.Marshal(&s)
132}
133