1// Copyright (c) 2016, 2018, 2019, Oracle and/or its affiliates. All rights reserved. 2// Code generated. DO NOT EDIT. 3 4package core 5 6import ( 7 "github.com/oracle/oci-go-sdk/common" 8 "net/http" 9) 10 11// ListConsoleHistoriesRequest wrapper for the ListConsoleHistories operation 12type ListConsoleHistoriesRequest struct { 13 14 // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment. 15 CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` 16 17 // The name of the availability domain. 18 // Example: `Uocm:PHX-AD-1` 19 AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` 20 21 // For list pagination. The maximum number of results per page, or items to return in a paginated 22 // "List" 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 // Example: `50` 25 Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` 26 27 // For list pagination. The value of the `opc-next-page` response header from the previous "List" 28 // call. For important details about how pagination works, see 29 // List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). 30 Page *string `mandatory:"false" contributesTo:"query" name:"page"` 31 32 // The OCID of the instance. 33 InstanceId *string `mandatory:"false" contributesTo:"query" name:"instanceId"` 34 35 // The field to sort by. You can provide one sort order (`sortOrder`). Default order for 36 // TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME 37 // sort order is case sensitive. 38 // **Note:** In general, some "List" operations (for example, `ListInstances`) let you 39 // optionally filter by availability domain if the scope of the resource type is within a 40 // single availability domain. If you call one of these "List" operations without specifying 41 // an availability domain, the resources are grouped by availability domain, then sorted. 42 SortBy ListConsoleHistoriesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` 43 44 // The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order 45 // is case sensitive. 46 SortOrder ListConsoleHistoriesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` 47 48 // A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. 49 LifecycleState ConsoleHistoryLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` 50 51 // Unique Oracle-assigned identifier for the request. 52 // If you need to contact Oracle about a particular request, please provide the request ID. 53 OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` 54 55 // Metadata about the request. This information will not be transmitted to the service, but 56 // represents information that the SDK will consume to drive retry behavior. 57 RequestMetadata common.RequestMetadata 58} 59 60func (request ListConsoleHistoriesRequest) String() string { 61 return common.PointerString(request) 62} 63 64// HTTPRequest implements the OCIRequest interface 65func (request ListConsoleHistoriesRequest) HTTPRequest(method, path string) (http.Request, error) { 66 return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) 67} 68 69// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. 70func (request ListConsoleHistoriesRequest) RetryPolicy() *common.RetryPolicy { 71 return request.RequestMetadata.RetryPolicy 72} 73 74// ListConsoleHistoriesResponse wrapper for the ListConsoleHistories operation 75type ListConsoleHistoriesResponse struct { 76 77 // The underlying http response 78 RawResponse *http.Response 79 80 // A list of []ConsoleHistory instances 81 Items []ConsoleHistory `presentIn:"body"` 82 83 // For list pagination. When this header appears in the response, additional pages 84 // of results remain. For important details about how pagination works, see 85 // List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). 86 OpcNextPage *string `presentIn:"header" name:"opc-next-page"` 87 88 // Unique Oracle-assigned identifier for the request. If you need to contact 89 // Oracle about a particular request, please provide the request ID. 90 OpcRequestId *string `presentIn:"header" name:"opc-request-id"` 91} 92 93func (response ListConsoleHistoriesResponse) String() string { 94 return common.PointerString(response) 95} 96 97// HTTPResponse implements the OCIResponse interface 98func (response ListConsoleHistoriesResponse) HTTPResponse() *http.Response { 99 return response.RawResponse 100} 101 102// ListConsoleHistoriesSortByEnum Enum with underlying type: string 103type ListConsoleHistoriesSortByEnum string 104 105// Set of constants representing the allowable values for ListConsoleHistoriesSortByEnum 106const ( 107 ListConsoleHistoriesSortByTimecreated ListConsoleHistoriesSortByEnum = "TIMECREATED" 108 ListConsoleHistoriesSortByDisplayname ListConsoleHistoriesSortByEnum = "DISPLAYNAME" 109) 110 111var mappingListConsoleHistoriesSortBy = map[string]ListConsoleHistoriesSortByEnum{ 112 "TIMECREATED": ListConsoleHistoriesSortByTimecreated, 113 "DISPLAYNAME": ListConsoleHistoriesSortByDisplayname, 114} 115 116// GetListConsoleHistoriesSortByEnumValues Enumerates the set of values for ListConsoleHistoriesSortByEnum 117func GetListConsoleHistoriesSortByEnumValues() []ListConsoleHistoriesSortByEnum { 118 values := make([]ListConsoleHistoriesSortByEnum, 0) 119 for _, v := range mappingListConsoleHistoriesSortBy { 120 values = append(values, v) 121 } 122 return values 123} 124 125// ListConsoleHistoriesSortOrderEnum Enum with underlying type: string 126type ListConsoleHistoriesSortOrderEnum string 127 128// Set of constants representing the allowable values for ListConsoleHistoriesSortOrderEnum 129const ( 130 ListConsoleHistoriesSortOrderAsc ListConsoleHistoriesSortOrderEnum = "ASC" 131 ListConsoleHistoriesSortOrderDesc ListConsoleHistoriesSortOrderEnum = "DESC" 132) 133 134var mappingListConsoleHistoriesSortOrder = map[string]ListConsoleHistoriesSortOrderEnum{ 135 "ASC": ListConsoleHistoriesSortOrderAsc, 136 "DESC": ListConsoleHistoriesSortOrderDesc, 137} 138 139// GetListConsoleHistoriesSortOrderEnumValues Enumerates the set of values for ListConsoleHistoriesSortOrderEnum 140func GetListConsoleHistoriesSortOrderEnumValues() []ListConsoleHistoriesSortOrderEnum { 141 values := make([]ListConsoleHistoriesSortOrderEnum, 0) 142 for _, v := range mappingListConsoleHistoriesSortOrder { 143 values = append(values, v) 144 } 145 return values 146} 147