1// Copyright (c) 2016, 2018, 2019, Oracle and/or its affiliates. All rights reserved.
2// Code generated. DO NOT EDIT.
3
4package identity
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 OCID of the compartment (remember that the tenancy is simply the root compartment).
15	CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"`
16
17	// The value of the `opc-next-page` response header from the previous "List" call.
18	Page *string `mandatory:"false" contributesTo:"query" name:"page"`
19
20	// The maximum number of items to return in a paginated "List" call.
21	Limit *int `mandatory:"false" contributesTo:"query" name:"limit"`
22
23	// The identifier of the resource the work request affects.
24	ResourceIdentifier *string `mandatory:"false" contributesTo:"query" name:"resourceIdentifier"`
25
26	// Unique Oracle-assigned identifier for the request.
27	// If you need to contact Oracle about a particular request, please provide the request ID.
28	OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
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 []WorkRequestSummary instances
56	Items []WorkRequestSummary `presentIn:"body"`
57
58	// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
59	// particular request, please provide the request ID.
60	OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
61
62	// For pagination of a list of items. When paging through a list, if this header appears in the response,
63	// then a partial list might have been returned. Include this value as the `page` parameter for the
64	// subsequent GET request to get the next batch of items.
65	OpcNextPage *string `presentIn:"header" name:"opc-next-page"`
66}
67
68func (response ListWorkRequestsResponse) String() string {
69	return common.PointerString(response)
70}
71
72// HTTPResponse implements the OCIResponse interface
73func (response ListWorkRequestsResponse) HTTPResponse() *http.Response {
74	return response.RawResponse
75}
76