1// Copyright (c) 2016, 2018, 2019, Oracle and/or its affiliates. All rights reserved. 2// Code generated. DO NOT EDIT. 3 4package objectstorage 5 6import ( 7 "github.com/oracle/oci-go-sdk/common" 8 "net/http" 9) 10 11// ListWorkRequestsRequest wrapper for the ListWorkRequests operation 12type ListWorkRequestsRequest struct { 13 14 // The ID of the compartment in which to list buckets. 15 CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` 16 17 // The client request ID for tracing. 18 OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` 19 20 // The page at which to start retrieving results. 21 Page *string `mandatory:"false" contributesTo:"query" name:"page"` 22 23 // The maximum number of items to return. 24 Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` 25 26 // Metadata about the request. This information will not be transmitted to the service, but 27 // represents information that the SDK will consume to drive retry behavior. 28 RequestMetadata common.RequestMetadata 29} 30 31func (request ListWorkRequestsRequest) String() string { 32 return common.PointerString(request) 33} 34 35// HTTPRequest implements the OCIRequest interface 36func (request ListWorkRequestsRequest) HTTPRequest(method, path string) (http.Request, error) { 37 return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) 38} 39 40// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. 41func (request ListWorkRequestsRequest) RetryPolicy() *common.RetryPolicy { 42 return request.RequestMetadata.RetryPolicy 43} 44 45// ListWorkRequestsResponse wrapper for the ListWorkRequests operation 46type ListWorkRequestsResponse struct { 47 48 // The underlying http response 49 RawResponse *http.Response 50 51 // A list of []WorkRequestSummary instances 52 Items []WorkRequestSummary `presentIn:"body"` 53 54 // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular 55 // request, provide this request ID. 56 OpcRequestId *string `presentIn:"header" name:"opc-request-id"` 57 58 // Paginating a list of work requests. 59 // In the GET request, set the limit to the number of compartment work requests that you want returned in the 60 // response. If the opc-next-page header appears in the response, then this is a partial list and there are 61 // additional work requests to get. Include the header's value as the `page` parameter in the subsequent 62 // GET request to get the next batch of work requests. Repeat this process to retrieve the entire list of work 63 // requests. 64 OpcNextPage *string `presentIn:"header" name:"opc-next-page"` 65 66 // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. 67 OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` 68} 69 70func (response ListWorkRequestsResponse) String() string { 71 return common.PointerString(response) 72} 73 74// HTTPResponse implements the OCIResponse interface 75func (response ListWorkRequestsResponse) HTTPResponse() *http.Response { 76 return response.RawResponse 77} 78