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 core
6
7import (
8	"github.com/oracle/oci-go-sdk/common"
9	"net/http"
10)
11
12// ListServicesRequest wrapper for the ListServices operation
13type ListServicesRequest struct {
14
15	// For list pagination. The maximum number of results per page, or items to return in a paginated
16	// "List" call. For important details about how pagination works, see
17	// List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
18	// Example: `50`
19	Limit *int `mandatory:"false" contributesTo:"query" name:"limit"`
20
21	// For list pagination. The value of the `opc-next-page` response header from the previous "List"
22	// call. For important details about how pagination works, see
23	// List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
24	Page *string `mandatory:"false" contributesTo:"query" name:"page"`
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 ListServicesRequest) String() string {
36	return common.PointerString(request)
37}
38
39// HTTPRequest implements the OCIRequest interface
40func (request ListServicesRequest) 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 ListServicesRequest) RetryPolicy() *common.RetryPolicy {
46	return request.RequestMetadata.RetryPolicy
47}
48
49// ListServicesResponse wrapper for the ListServices operation
50type ListServicesResponse struct {
51
52	// The underlying http response
53	RawResponse *http.Response
54
55	// A list of []Service instances
56	Items []Service `presentIn:"body"`
57
58	// For list pagination. When this header appears in the response, additional pages
59	// of results remain. For important details about how pagination works, see
60	// List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
61	OpcNextPage *string `presentIn:"header" name:"opc-next-page"`
62
63	// Unique Oracle-assigned identifier for the request. If you need to contact
64	// Oracle about a particular request, please provide the request ID.
65	OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
66}
67
68func (response ListServicesResponse) String() string {
69	return common.PointerString(response)
70}
71
72// HTTPResponse implements the OCIResponse interface
73func (response ListServicesResponse) HTTPResponse() *http.Response {
74	return response.RawResponse
75}
76