1// Copyright (c) 2016, 2018, 2019, Oracle and/or its affiliates. All rights reserved. 2// Code generated. DO NOT EDIT. 3 4package filestorage 5 6import ( 7 "github.com/oracle/oci-go-sdk/common" 8 "net/http" 9) 10 11// ListSnapshotsRequest wrapper for the ListSnapshots operation 12type ListSnapshotsRequest struct { 13 14 // The OCID of the file system. 15 FileSystemId *string `mandatory:"true" contributesTo:"query" name:"fileSystemId"` 16 17 // For list pagination. The maximum number of results per page, 18 // or items to return in a paginated "List" call. 19 // 1 is the minimum, 1000 is the maximum. 20 // For important details about how pagination works, 21 // see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). 22 // Example: `500` 23 Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` 24 25 // For list pagination. The value of the `opc-next-page` response 26 // header from the previous "List" call. 27 // For important details about how pagination works, 28 // see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). 29 Page *string `mandatory:"false" contributesTo:"query" name:"page"` 30 31 // Filter results by the specified lifecycle state. Must be a valid 32 // state for the resource type. 33 LifecycleState ListSnapshotsLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` 34 35 // Filter results by OCID. Must be an OCID of the correct type for 36 // the resouce type. 37 Id *string `mandatory:"false" contributesTo:"query" name:"id"` 38 39 // The sort order to use, either 'asc' or 'desc', where 'asc' is 40 // ascending and 'desc' is descending. 41 SortOrder ListSnapshotsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` 42 43 // Unique identifier for the request. 44 // If you need to contact Oracle about a particular request, please provide the request ID. 45 OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` 46 47 // Metadata about the request. This information will not be transmitted to the service, but 48 // represents information that the SDK will consume to drive retry behavior. 49 RequestMetadata common.RequestMetadata 50} 51 52func (request ListSnapshotsRequest) String() string { 53 return common.PointerString(request) 54} 55 56// HTTPRequest implements the OCIRequest interface 57func (request ListSnapshotsRequest) HTTPRequest(method, path string) (http.Request, error) { 58 return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) 59} 60 61// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. 62func (request ListSnapshotsRequest) RetryPolicy() *common.RetryPolicy { 63 return request.RequestMetadata.RetryPolicy 64} 65 66// ListSnapshotsResponse wrapper for the ListSnapshots operation 67type ListSnapshotsResponse struct { 68 69 // The underlying http response 70 RawResponse *http.Response 71 72 // A list of []SnapshotSummary instances 73 Items []SnapshotSummary `presentIn:"body"` 74 75 // For list pagination. When this header appears in the response, 76 // additional pages of results remain. 77 // For important details about how pagination works, 78 // see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). 79 OpcNextPage *string `presentIn:"header" name:"opc-next-page"` 80 81 // Unique Oracle-assigned identifier for the request. If 82 // you need to contact Oracle about a particular request, 83 // please provide the request ID. 84 OpcRequestId *string `presentIn:"header" name:"opc-request-id"` 85} 86 87func (response ListSnapshotsResponse) String() string { 88 return common.PointerString(response) 89} 90 91// HTTPResponse implements the OCIResponse interface 92func (response ListSnapshotsResponse) HTTPResponse() *http.Response { 93 return response.RawResponse 94} 95 96// ListSnapshotsLifecycleStateEnum Enum with underlying type: string 97type ListSnapshotsLifecycleStateEnum string 98 99// Set of constants representing the allowable values for ListSnapshotsLifecycleStateEnum 100const ( 101 ListSnapshotsLifecycleStateCreating ListSnapshotsLifecycleStateEnum = "CREATING" 102 ListSnapshotsLifecycleStateActive ListSnapshotsLifecycleStateEnum = "ACTIVE" 103 ListSnapshotsLifecycleStateDeleting ListSnapshotsLifecycleStateEnum = "DELETING" 104 ListSnapshotsLifecycleStateDeleted ListSnapshotsLifecycleStateEnum = "DELETED" 105 ListSnapshotsLifecycleStateFailed ListSnapshotsLifecycleStateEnum = "FAILED" 106) 107 108var mappingListSnapshotsLifecycleState = map[string]ListSnapshotsLifecycleStateEnum{ 109 "CREATING": ListSnapshotsLifecycleStateCreating, 110 "ACTIVE": ListSnapshotsLifecycleStateActive, 111 "DELETING": ListSnapshotsLifecycleStateDeleting, 112 "DELETED": ListSnapshotsLifecycleStateDeleted, 113 "FAILED": ListSnapshotsLifecycleStateFailed, 114} 115 116// GetListSnapshotsLifecycleStateEnumValues Enumerates the set of values for ListSnapshotsLifecycleStateEnum 117func GetListSnapshotsLifecycleStateEnumValues() []ListSnapshotsLifecycleStateEnum { 118 values := make([]ListSnapshotsLifecycleStateEnum, 0) 119 for _, v := range mappingListSnapshotsLifecycleState { 120 values = append(values, v) 121 } 122 return values 123} 124 125// ListSnapshotsSortOrderEnum Enum with underlying type: string 126type ListSnapshotsSortOrderEnum string 127 128// Set of constants representing the allowable values for ListSnapshotsSortOrderEnum 129const ( 130 ListSnapshotsSortOrderAsc ListSnapshotsSortOrderEnum = "ASC" 131 ListSnapshotsSortOrderDesc ListSnapshotsSortOrderEnum = "DESC" 132) 133 134var mappingListSnapshotsSortOrder = map[string]ListSnapshotsSortOrderEnum{ 135 "ASC": ListSnapshotsSortOrderAsc, 136 "DESC": ListSnapshotsSortOrderDesc, 137} 138 139// GetListSnapshotsSortOrderEnumValues Enumerates the set of values for ListSnapshotsSortOrderEnum 140func GetListSnapshotsSortOrderEnumValues() []ListSnapshotsSortOrderEnum { 141 values := make([]ListSnapshotsSortOrderEnum, 0) 142 for _, v := range mappingListSnapshotsSortOrder { 143 values = append(values, v) 144 } 145 return values 146} 147