-
Notifications
You must be signed in to change notification settings - Fork 82
/
backup.go
147 lines (116 loc) · 5.98 KB
/
backup.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
// Copyright (c) 2016, 2018, 2020, Oracle and/or its affiliates. All rights reserved.
// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
// Code generated. DO NOT EDIT.
// Database Service API
//
// The API for the Database Service. Use this API to manage resources such as databases and DB Systems. For more information, see Overview of the Database Service (https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/databaseoverview.htm).
//
package database
import (
"github.com/oracle/oci-go-sdk/common"
)
// Backup The representation of Backup
type Backup struct {
// The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the backup.
Id *string `mandatory:"false" json:"id"`
// The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment.
CompartmentId *string `mandatory:"false" json:"compartmentId"`
// The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the database.
DatabaseId *string `mandatory:"false" json:"databaseId"`
// The user-friendly name for the backup. The name does not have to be unique.
DisplayName *string `mandatory:"false" json:"displayName"`
// The type of backup.
Type BackupTypeEnum `mandatory:"false" json:"type,omitempty"`
// The date and time the backup started.
TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"`
// The date and time the backup was completed.
TimeEnded *common.SDKTime `mandatory:"false" json:"timeEnded"`
// Additional information about the current lifecycleState.
LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"`
// The name of the availability domain where the database backup is stored.
AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"`
// The current state of the backup.
LifecycleState BackupLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"`
// The Oracle Database edition of the DB system from which the database backup was taken.
DatabaseEdition BackupDatabaseEditionEnum `mandatory:"false" json:"databaseEdition,omitempty"`
// The size of the database in gigabytes at the time the backup was taken.
DatabaseSizeInGBs *float64 `mandatory:"false" json:"databaseSizeInGBs"`
// Shape of the backup's source database.
Shape *string `mandatory:"false" json:"shape"`
// Version of the backup's source database
Version *string `mandatory:"false" json:"version"`
}
func (m Backup) String() string {
return common.PointerString(m)
}
// BackupTypeEnum Enum with underlying type: string
type BackupTypeEnum string
// Set of constants representing the allowable values for BackupTypeEnum
const (
BackupTypeIncremental BackupTypeEnum = "INCREMENTAL"
BackupTypeFull BackupTypeEnum = "FULL"
BackupTypeVirtualFull BackupTypeEnum = "VIRTUAL_FULL"
)
var mappingBackupType = map[string]BackupTypeEnum{
"INCREMENTAL": BackupTypeIncremental,
"FULL": BackupTypeFull,
"VIRTUAL_FULL": BackupTypeVirtualFull,
}
// GetBackupTypeEnumValues Enumerates the set of values for BackupTypeEnum
func GetBackupTypeEnumValues() []BackupTypeEnum {
values := make([]BackupTypeEnum, 0)
for _, v := range mappingBackupType {
values = append(values, v)
}
return values
}
// BackupLifecycleStateEnum Enum with underlying type: string
type BackupLifecycleStateEnum string
// Set of constants representing the allowable values for BackupLifecycleStateEnum
const (
BackupLifecycleStateCreating BackupLifecycleStateEnum = "CREATING"
BackupLifecycleStateActive BackupLifecycleStateEnum = "ACTIVE"
BackupLifecycleStateDeleting BackupLifecycleStateEnum = "DELETING"
BackupLifecycleStateDeleted BackupLifecycleStateEnum = "DELETED"
BackupLifecycleStateFailed BackupLifecycleStateEnum = "FAILED"
BackupLifecycleStateRestoring BackupLifecycleStateEnum = "RESTORING"
)
var mappingBackupLifecycleState = map[string]BackupLifecycleStateEnum{
"CREATING": BackupLifecycleStateCreating,
"ACTIVE": BackupLifecycleStateActive,
"DELETING": BackupLifecycleStateDeleting,
"DELETED": BackupLifecycleStateDeleted,
"FAILED": BackupLifecycleStateFailed,
"RESTORING": BackupLifecycleStateRestoring,
}
// GetBackupLifecycleStateEnumValues Enumerates the set of values for BackupLifecycleStateEnum
func GetBackupLifecycleStateEnumValues() []BackupLifecycleStateEnum {
values := make([]BackupLifecycleStateEnum, 0)
for _, v := range mappingBackupLifecycleState {
values = append(values, v)
}
return values
}
// BackupDatabaseEditionEnum Enum with underlying type: string
type BackupDatabaseEditionEnum string
// Set of constants representing the allowable values for BackupDatabaseEditionEnum
const (
BackupDatabaseEditionStandardEdition BackupDatabaseEditionEnum = "STANDARD_EDITION"
BackupDatabaseEditionEnterpriseEdition BackupDatabaseEditionEnum = "ENTERPRISE_EDITION"
BackupDatabaseEditionEnterpriseEditionHighPerformance BackupDatabaseEditionEnum = "ENTERPRISE_EDITION_HIGH_PERFORMANCE"
BackupDatabaseEditionEnterpriseEditionExtremePerformance BackupDatabaseEditionEnum = "ENTERPRISE_EDITION_EXTREME_PERFORMANCE"
)
var mappingBackupDatabaseEdition = map[string]BackupDatabaseEditionEnum{
"STANDARD_EDITION": BackupDatabaseEditionStandardEdition,
"ENTERPRISE_EDITION": BackupDatabaseEditionEnterpriseEdition,
"ENTERPRISE_EDITION_HIGH_PERFORMANCE": BackupDatabaseEditionEnterpriseEditionHighPerformance,
"ENTERPRISE_EDITION_EXTREME_PERFORMANCE": BackupDatabaseEditionEnterpriseEditionExtremePerformance,
}
// GetBackupDatabaseEditionEnumValues Enumerates the set of values for BackupDatabaseEditionEnum
func GetBackupDatabaseEditionEnumValues() []BackupDatabaseEditionEnum {
values := make([]BackupDatabaseEditionEnum, 0)
for _, v := range mappingBackupDatabaseEdition {
values = append(values, v)
}
return values
}