1// Copyright (c) 2016, 2018, 2020, Oracle and/or its affiliates.  All rights reserved.
2// 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.
3// Code generated. DO NOT EDIT.
4
5package oce
6
7import (
8	"github.com/oracle/oci-go-sdk/common"
9	"net/http"
10)
11
12// ListWorkRequestsRequest wrapper for the ListWorkRequests operation
13type ListWorkRequestsRequest struct {
14
15	// The ID of the compartment in which to list resources.
16	CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"`
17
18	// The resource Identifier for which to list resources.
19	ResourceId *string `mandatory:"false" contributesTo:"query" name:"resourceId"`
20
21	// The client request ID for tracing.
22	OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
23
24	// The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.
25	Page *string `mandatory:"false" contributesTo:"query" name:"page"`
26
27	// The maximum number of items to return.
28	Limit *int `mandatory:"false" contributesTo:"query" name:"limit"`
29
30	// Metadata about the request. This information will not be transmitted to the service, but
31	// represents information that the SDK will consume to drive retry behavior.
32	RequestMetadata common.RequestMetadata
33}
34
35func (request ListWorkRequestsRequest) String() string {
36	return common.PointerString(request)
37}
38
39// HTTPRequest implements the OCIRequest interface
40func (request ListWorkRequestsRequest) HTTPRequest(method, path string) (http.Request, error) {
41	return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
42}
43
44// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
45func (request ListWorkRequestsRequest) RetryPolicy() *common.RetryPolicy {
46	return request.RequestMetadata.RetryPolicy
47}
48
49// ListWorkRequestsResponse wrapper for the ListWorkRequests operation
50type ListWorkRequestsResponse struct {
51
52	// The underlying http response
53	RawResponse *http.Response
54
55	// A list of []WorkRequest instances
56	Items []WorkRequest `presentIn:"body"`
57
58	// Unique Oracle-assigned identifier for the request. If
59	// you need to contact Oracle about a particular request,
60	// please provide the request ID.
61	OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
62
63	// For pagination of a list of items. When paging through a list, if this header appears in the response,
64	// then a partial list might have been returned. Include this value as the `page` parameter for the
65	// subsequent GET request to get the next batch of items.
66	OpcNextPage *string `presentIn:"header" name:"opc-next-page"`
67}
68
69func (response ListWorkRequestsResponse) String() string {
70	return common.PointerString(response)
71}
72
73// HTTPResponse implements the OCIResponse interface
74func (response ListWorkRequestsResponse) HTTPResponse() *http.Response {
75	return response.RawResponse
76}
77