1// Copyright (c) 2016, 2018, 2019, Oracle and/or its affiliates. All rights reserved. 2// Code generated. DO NOT EDIT. 3 4package limits 5 6import ( 7 "github.com/oracle/oci-go-sdk/common" 8 "net/http" 9) 10 11// ListServicesRequest wrapper for the ListServices operation 12type ListServicesRequest struct { 13 14 // The OCID of the parent compartment (remember that the tenancy is simply the root compartment). 15 CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` 16 17 // The field to sort by. 18 SortBy ListServicesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` 19 20 // The sort order to use, either 'asc' or 'desc'. By default it will be ascending. 21 SortOrder ListServicesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` 22 23 // The maximum number of items to return in a paginated "List" call. 24 Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` 25 26 // The value of the `opc-next-page` response header from the previous "List" call. 27 Page *string `mandatory:"false" contributesTo:"query" name:"page"` 28 29 // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a 30 // particular request, please provide the request ID. 31 OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` 32 33 // Metadata about the request. This information will not be transmitted to the service, but 34 // represents information that the SDK will consume to drive retry behavior. 35 RequestMetadata common.RequestMetadata 36} 37 38func (request ListServicesRequest) String() string { 39 return common.PointerString(request) 40} 41 42// HTTPRequest implements the OCIRequest interface 43func (request ListServicesRequest) HTTPRequest(method, path string) (http.Request, error) { 44 return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) 45} 46 47// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. 48func (request ListServicesRequest) RetryPolicy() *common.RetryPolicy { 49 return request.RequestMetadata.RetryPolicy 50} 51 52// ListServicesResponse wrapper for the ListServices operation 53type ListServicesResponse struct { 54 55 // The underlying http response 56 RawResponse *http.Response 57 58 // A list of []ServiceSummary instances 59 Items []ServiceSummary `presentIn:"body"` 60 61 // For list pagination. When this header appears in the response, additional pages 62 // of results remain. For important details about how pagination works, see 63 // List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). 64 OpcNextPage *string `presentIn:"header" name:"opc-next-page"` 65 66 // Unique Oracle-assigned identifier for the request. If you need to contact 67 // Oracle about a particular request, please provide the request ID. 68 OpcRequestId *string `presentIn:"header" name:"opc-request-id"` 69} 70 71func (response ListServicesResponse) String() string { 72 return common.PointerString(response) 73} 74 75// HTTPResponse implements the OCIResponse interface 76func (response ListServicesResponse) HTTPResponse() *http.Response { 77 return response.RawResponse 78} 79 80// ListServicesSortByEnum Enum with underlying type: string 81type ListServicesSortByEnum string 82 83// Set of constants representing the allowable values for ListServicesSortByEnum 84const ( 85 ListServicesSortByName ListServicesSortByEnum = "name" 86 ListServicesSortByDescription ListServicesSortByEnum = "description" 87) 88 89var mappingListServicesSortBy = map[string]ListServicesSortByEnum{ 90 "name": ListServicesSortByName, 91 "description": ListServicesSortByDescription, 92} 93 94// GetListServicesSortByEnumValues Enumerates the set of values for ListServicesSortByEnum 95func GetListServicesSortByEnumValues() []ListServicesSortByEnum { 96 values := make([]ListServicesSortByEnum, 0) 97 for _, v := range mappingListServicesSortBy { 98 values = append(values, v) 99 } 100 return values 101} 102 103// ListServicesSortOrderEnum Enum with underlying type: string 104type ListServicesSortOrderEnum string 105 106// Set of constants representing the allowable values for ListServicesSortOrderEnum 107const ( 108 ListServicesSortOrderAsc ListServicesSortOrderEnum = "ASC" 109 ListServicesSortOrderDesc ListServicesSortOrderEnum = "DESC" 110) 111 112var mappingListServicesSortOrder = map[string]ListServicesSortOrderEnum{ 113 "ASC": ListServicesSortOrderAsc, 114 "DESC": ListServicesSortOrderDesc, 115} 116 117// GetListServicesSortOrderEnumValues Enumerates the set of values for ListServicesSortOrderEnum 118func GetListServicesSortOrderEnumValues() []ListServicesSortOrderEnum { 119 values := make([]ListServicesSortOrderEnum, 0) 120 for _, v := range mappingListServicesSortOrder { 121 values = append(values, v) 122 } 123 return values 124} 125