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 loganalytics
6
7import (
8	"github.com/oracle/oci-go-sdk/common"
9	"net/http"
10)
11
12// ListUploadsRequest wrapper for the ListUploads operation
13type ListUploadsRequest struct {
14
15	// The Log Analytics namespace used for the request.
16	NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"`
17
18	// Name of the upload container.
19	Name *string `mandatory:"false" contributesTo:"query" name:"name"`
20
21	// A filter to return only uploads whose name contains the given name.
22	NameContains *string `mandatory:"false" contributesTo:"query" name:"nameContains"`
23
24	// The maximum number of items to return.
25	Limit *int `mandatory:"false" contributesTo:"query" name:"limit"`
26
27	// The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.
28	Page *string `mandatory:"false" contributesTo:"query" name:"page"`
29
30	// The sort order to use, either ascending (`ASC`) or descending (`DESC`).
31	SortOrder ListUploadsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"`
32
33	// The field to sort by. Only one sort order may be provided. Default order for timeUpdated is descending.
34	// Default order for name is ascending. If no value is specified timeUpdated is default.
35	SortBy ListUploadsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"`
36
37	// The client request ID for tracing.
38	OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
39
40	// Metadata about the request. This information will not be transmitted to the service, but
41	// represents information that the SDK will consume to drive retry behavior.
42	RequestMetadata common.RequestMetadata
43}
44
45func (request ListUploadsRequest) String() string {
46	return common.PointerString(request)
47}
48
49// HTTPRequest implements the OCIRequest interface
50func (request ListUploadsRequest) HTTPRequest(method, path string) (http.Request, error) {
51	return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
52}
53
54// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
55func (request ListUploadsRequest) RetryPolicy() *common.RetryPolicy {
56	return request.RequestMetadata.RetryPolicy
57}
58
59// ListUploadsResponse wrapper for the ListUploads operation
60type ListUploadsResponse struct {
61
62	// The underlying http response
63	RawResponse *http.Response
64
65	// A list of UploadCollection instances
66	UploadCollection `presentIn:"body"`
67
68	// Unique Oracle-assigned identifier for the request. If you need to contact
69	// Oracle about a particular request, please provide the request ID.
70	OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
71
72	// For pagination of a list of items. When paging through a list, if this header appears in the response,
73	// then additional items may be available on the next page of the list. Include this value as the `page` parameter for the
74	// subsequent request to get the next batch of items.
75	OpcNextPage *string `presentIn:"header" name:"opc-next-page"`
76
77	// Total count.
78	OpcTotalItems *int64 `presentIn:"header" name:"opc-total-items"`
79}
80
81func (response ListUploadsResponse) String() string {
82	return common.PointerString(response)
83}
84
85// HTTPResponse implements the OCIResponse interface
86func (response ListUploadsResponse) HTTPResponse() *http.Response {
87	return response.RawResponse
88}
89
90// ListUploadsSortOrderEnum Enum with underlying type: string
91type ListUploadsSortOrderEnum string
92
93// Set of constants representing the allowable values for ListUploadsSortOrderEnum
94const (
95	ListUploadsSortOrderAsc  ListUploadsSortOrderEnum = "ASC"
96	ListUploadsSortOrderDesc ListUploadsSortOrderEnum = "DESC"
97)
98
99var mappingListUploadsSortOrder = map[string]ListUploadsSortOrderEnum{
100	"ASC":  ListUploadsSortOrderAsc,
101	"DESC": ListUploadsSortOrderDesc,
102}
103
104// GetListUploadsSortOrderEnumValues Enumerates the set of values for ListUploadsSortOrderEnum
105func GetListUploadsSortOrderEnumValues() []ListUploadsSortOrderEnum {
106	values := make([]ListUploadsSortOrderEnum, 0)
107	for _, v := range mappingListUploadsSortOrder {
108		values = append(values, v)
109	}
110	return values
111}
112
113// ListUploadsSortByEnum Enum with underlying type: string
114type ListUploadsSortByEnum string
115
116// Set of constants representing the allowable values for ListUploadsSortByEnum
117const (
118	ListUploadsSortByTimeupdated ListUploadsSortByEnum = "timeUpdated"
119	ListUploadsSortByTimecreated ListUploadsSortByEnum = "timeCreated"
120	ListUploadsSortByName        ListUploadsSortByEnum = "name"
121)
122
123var mappingListUploadsSortBy = map[string]ListUploadsSortByEnum{
124	"timeUpdated": ListUploadsSortByTimeupdated,
125	"timeCreated": ListUploadsSortByTimecreated,
126	"name":        ListUploadsSortByName,
127}
128
129// GetListUploadsSortByEnumValues Enumerates the set of values for ListUploadsSortByEnum
130func GetListUploadsSortByEnumValues() []ListUploadsSortByEnum {
131	values := make([]ListUploadsSortByEnum, 0)
132	for _, v := range mappingListUploadsSortBy {
133		values = append(values, v)
134	}
135	return values
136}
137