-
Notifications
You must be signed in to change notification settings - Fork 82
/
storage_work_request_summary.go
111 lines (83 loc) · 4.79 KB
/
storage_work_request_summary.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
// Copyright (c) 2016, 2018, 2023, 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.
// LogAnalytics API
//
// The LogAnalytics API for the LogAnalytics service.
//
package loganalytics
import (
"fmt"
"github.com/oracle/oci-go-sdk/v65/common"
"strings"
)
// StorageWorkRequestSummary This is the summary of a storage work request.
type StorageWorkRequestSummary struct {
// This is the OCID of the storage work Request.
Id *string `mandatory:"true" json:"id"`
// This is the work request status.
Status WorkRequestStatusEnum `mandatory:"true" json:"status"`
// This is the type of the work request.
OperationType StorageOperationTypeEnum `mandatory:"true" json:"operationType"`
// Compartment Identifier OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
CompartmentId *string `mandatory:"false" json:"compartmentId"`
// When the work request started.
TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"`
// When the work request was accepted. Should match timeStarted in all cases.
TimeAccepted *common.SDKTime `mandatory:"false" json:"timeAccepted"`
// When the work request finished execution.
TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"`
// When the work request will expire.
TimeExpires *common.SDKTime `mandatory:"false" json:"timeExpires"`
// Percentage progress completion of the work request.
PercentComplete *int `mandatory:"false" json:"percentComplete"`
// This is the start of the time interval
TimeDataStarted *common.SDKTime `mandatory:"false" json:"timeDataStarted"`
// This is the end of the time interval
TimeDataEnded *common.SDKTime `mandatory:"false" json:"timeDataEnded"`
// This is the solr query used to filter data for purge, '*' means all
PurgeQueryString *string `mandatory:"false" json:"purgeQueryString"`
// Thie is the type of data to be purged
DataType StorageDataTypeEnum `mandatory:"false" json:"dataType,omitempty"`
// This provides more detailed status if applicable
StatusDetails *string `mandatory:"false" json:"statusDetails"`
// This provides more detailed info about the work request if applicable
OperationDetails *string `mandatory:"false" json:"operationDetails"`
// This is the policy name if applicable (e.g. purge policy)
PolicyName *string `mandatory:"false" json:"policyName"`
// This is the purge policy ID if applicable
PolicyId *string `mandatory:"false" json:"policyId"`
// This is the data usage in bytes if applicable
StorageUsageInBytes *int64 `mandatory:"false" json:"storageUsageInBytes"`
// If true, purge child compartments data, only applicable to purge request
CompartmentIdInSubtree *bool `mandatory:"false" json:"compartmentIdInSubtree"`
// This is the key ID for encryption key.
KeyId *string `mandatory:"false" json:"keyId"`
// The type of customer encryption key. It can be archival, active or all.
KeyType EncryptionKeyTypeEnum `mandatory:"false" json:"keyType,omitempty"`
}
func (m StorageWorkRequestSummary) String() string {
return common.PointerString(m)
}
// ValidateEnumValue returns an error when providing an unsupported enum value
// This function is being called during constructing API request process
// Not recommended for calling this function directly
func (m StorageWorkRequestSummary) ValidateEnumValue() (bool, error) {
errMessage := []string{}
if _, ok := GetMappingWorkRequestStatusEnum(string(m.Status)); !ok && m.Status != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", m.Status, strings.Join(GetWorkRequestStatusEnumStringValues(), ",")))
}
if _, ok := GetMappingStorageOperationTypeEnum(string(m.OperationType)); !ok && m.OperationType != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OperationType: %s. Supported values are: %s.", m.OperationType, strings.Join(GetStorageOperationTypeEnumStringValues(), ",")))
}
if _, ok := GetMappingStorageDataTypeEnum(string(m.DataType)); !ok && m.DataType != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DataType: %s. Supported values are: %s.", m.DataType, strings.Join(GetStorageDataTypeEnumStringValues(), ",")))
}
if _, ok := GetMappingEncryptionKeyTypeEnum(string(m.KeyType)); !ok && m.KeyType != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for KeyType: %s. Supported values are: %s.", m.KeyType, strings.Join(GetEncryptionKeyTypeEnumStringValues(), ",")))
}
if len(errMessage) > 0 {
return true, fmt.Errorf(strings.Join(errMessage, "\n"))
}
return false, nil
}