1// Copyright (c) 2016, 2018, 2019, Oracle and/or its affiliates. All rights reserved. 2// Code generated. DO NOT EDIT. 3 4// Object Storage Service API 5// 6// Common set of Object Storage and Archive Storage APIs for managing buckets, objects, and related resources. 7// 8 9package objectstorage 10 11import ( 12 "github.com/oracle/oci-go-sdk/common" 13) 14 15// WorkRequest A description of workRequest status. 16type WorkRequest struct { 17 18 // The type of work request. 19 OperationType WorkRequestOperationTypeEnum `mandatory:"false" json:"operationType,omitempty"` 20 21 // The status of the specified work request. 22 Status WorkRequestStatusEnum `mandatory:"false" json:"status,omitempty"` 23 24 // The id of the work request. 25 Id *string `mandatory:"false" json:"id"` 26 27 // The OCID of the compartment that contains the work request. Work requests are scoped to the same compartment 28 // as the resource the work request affects. 29 // If the work request affects multiple resources and those resources are not in the same compartment, the OCID of 30 // the primary resource is used. For example, you can copy an object in a bucket in one compartment to a bucket in 31 // another compartment. In this case, the OCID of the source compartment is used. 32 CompartmentId *string `mandatory:"false" json:"compartmentId"` 33 34 Resources []WorkRequestResource `mandatory:"false" json:"resources"` 35 36 // Percentage of the work request completed. 37 PercentComplete *float32 `mandatory:"false" json:"percentComplete"` 38 39 // The date and time the work request was created, as described in 40 // RFC 3339 (https://tools.ietf.org/rfc/rfc3339), section 14.29. 41 TimeAccepted *common.SDKTime `mandatory:"false" json:"timeAccepted"` 42 43 // The date and time the work request was started, as described in 44 // RFC 3339 (https://tools.ietf.org/rfc/rfc3339), section 14.29. 45 TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` 46 47 // The date and time the work request was finished, as described in 48 // RFC 3339 (https://tools.ietf.org/rfc/rfc3339), section 14.29. 49 TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` 50} 51 52func (m WorkRequest) String() string { 53 return common.PointerString(m) 54} 55 56// WorkRequestOperationTypeEnum Enum with underlying type: string 57type WorkRequestOperationTypeEnum string 58 59// Set of constants representing the allowable values for WorkRequestOperationTypeEnum 60const ( 61 WorkRequestOperationTypeCopyObject WorkRequestOperationTypeEnum = "COPY_OBJECT" 62 WorkRequestOperationTypeReencrypt WorkRequestOperationTypeEnum = "REENCRYPT" 63) 64 65var mappingWorkRequestOperationType = map[string]WorkRequestOperationTypeEnum{ 66 "COPY_OBJECT": WorkRequestOperationTypeCopyObject, 67 "REENCRYPT": WorkRequestOperationTypeReencrypt, 68} 69 70// GetWorkRequestOperationTypeEnumValues Enumerates the set of values for WorkRequestOperationTypeEnum 71func GetWorkRequestOperationTypeEnumValues() []WorkRequestOperationTypeEnum { 72 values := make([]WorkRequestOperationTypeEnum, 0) 73 for _, v := range mappingWorkRequestOperationType { 74 values = append(values, v) 75 } 76 return values 77} 78 79// WorkRequestStatusEnum Enum with underlying type: string 80type WorkRequestStatusEnum string 81 82// Set of constants representing the allowable values for WorkRequestStatusEnum 83const ( 84 WorkRequestStatusAccepted WorkRequestStatusEnum = "ACCEPTED" 85 WorkRequestStatusInProgress WorkRequestStatusEnum = "IN_PROGRESS" 86 WorkRequestStatusFailed WorkRequestStatusEnum = "FAILED" 87 WorkRequestStatusCompleted WorkRequestStatusEnum = "COMPLETED" 88 WorkRequestStatusCanceling WorkRequestStatusEnum = "CANCELING" 89 WorkRequestStatusCanceled WorkRequestStatusEnum = "CANCELED" 90) 91 92var mappingWorkRequestStatus = map[string]WorkRequestStatusEnum{ 93 "ACCEPTED": WorkRequestStatusAccepted, 94 "IN_PROGRESS": WorkRequestStatusInProgress, 95 "FAILED": WorkRequestStatusFailed, 96 "COMPLETED": WorkRequestStatusCompleted, 97 "CANCELING": WorkRequestStatusCanceling, 98 "CANCELED": WorkRequestStatusCanceled, 99} 100 101// GetWorkRequestStatusEnumValues Enumerates the set of values for WorkRequestStatusEnum 102func GetWorkRequestStatusEnumValues() []WorkRequestStatusEnum { 103 values := make([]WorkRequestStatusEnum, 0) 104 for _, v := range mappingWorkRequestStatus { 105 values = append(values, v) 106 } 107 return values 108} 109