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 osmanagement
6
7import (
8	"github.com/oracle/oci-go-sdk/common"
9	"net/http"
10)
11
12// ListScheduledJobsRequest wrapper for the ListScheduledJobs operation
13type ListScheduledJobsRequest struct {
14
15	// The ID of the compartment in which to list resources.
16	CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"`
17
18	// A user-friendly name. Does not have to be unique, and it's changeable.
19	// Example: `My new resource`
20	DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"`
21
22	// The ID of the managed instance for which to list resources.
23	ManagedInstanceId *string `mandatory:"false" contributesTo:"query" name:"managedInstanceId"`
24
25	// The ID of the managed instace group for which to list resources.
26	ManagedInstanceGroupId *string `mandatory:"false" contributesTo:"query" name:"managedInstanceGroupId"`
27
28	// The operation type for which to list resources
29	OperationType ListScheduledJobsOperationTypeEnum `mandatory:"false" contributesTo:"query" name:"operationType" omitEmpty:"true"`
30
31	// The maximum number of items to return.
32	Limit *int `mandatory:"false" contributesTo:"query" name:"limit"`
33
34	// The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.
35	Page *string `mandatory:"false" contributesTo:"query" name:"page"`
36
37	// The sort order to use, either 'asc' or 'desc'.
38	SortOrder ListScheduledJobsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"`
39
40	// The field to sort by. Only one sort order may be provided. Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. If no value is specified TIMECREATED is default.
41	SortBy ListScheduledJobsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"`
42
43	// The current lifecycle state for the object.
44	LifecycleState ListScheduledJobsLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"`
45
46	// The client request ID for tracing.
47	OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
48
49	// The OS family for which to list resources.
50	OsFamily ListScheduledJobsOsFamilyEnum `mandatory:"false" contributesTo:"query" name:"osFamily" omitEmpty:"true"`
51
52	// Metadata about the request. This information will not be transmitted to the service, but
53	// represents information that the SDK will consume to drive retry behavior.
54	RequestMetadata common.RequestMetadata
55}
56
57func (request ListScheduledJobsRequest) String() string {
58	return common.PointerString(request)
59}
60
61// HTTPRequest implements the OCIRequest interface
62func (request ListScheduledJobsRequest) HTTPRequest(method, path string) (http.Request, error) {
63	return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
64}
65
66// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
67func (request ListScheduledJobsRequest) RetryPolicy() *common.RetryPolicy {
68	return request.RequestMetadata.RetryPolicy
69}
70
71// ListScheduledJobsResponse wrapper for the ListScheduledJobs operation
72type ListScheduledJobsResponse struct {
73
74	// The underlying http response
75	RawResponse *http.Response
76
77	// A list of []ScheduledJobSummary instances
78	Items []ScheduledJobSummary `presentIn:"body"`
79
80	// Unique Oracle-assigned identifier for the request. If
81	// you need to contact Oracle about a particular request,
82	// please provide the request ID.
83	OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
84
85	// For pagination of a list of items. When paging through a list, if this header appears in the response,
86	// then a partial list might have been returned. Include this value as the `page` parameter for the
87	// subsequent GET request to get the next batch of items.
88	OpcNextPage *string `presentIn:"header" name:"opc-next-page"`
89}
90
91func (response ListScheduledJobsResponse) String() string {
92	return common.PointerString(response)
93}
94
95// HTTPResponse implements the OCIResponse interface
96func (response ListScheduledJobsResponse) HTTPResponse() *http.Response {
97	return response.RawResponse
98}
99
100// ListScheduledJobsOperationTypeEnum Enum with underlying type: string
101type ListScheduledJobsOperationTypeEnum string
102
103// Set of constants representing the allowable values for ListScheduledJobsOperationTypeEnum
104const (
105	ListScheduledJobsOperationTypeInstall   ListScheduledJobsOperationTypeEnum = "INSTALL"
106	ListScheduledJobsOperationTypeUpdate    ListScheduledJobsOperationTypeEnum = "UPDATE"
107	ListScheduledJobsOperationTypeRemove    ListScheduledJobsOperationTypeEnum = "REMOVE"
108	ListScheduledJobsOperationTypeUpdateall ListScheduledJobsOperationTypeEnum = "UPDATEALL"
109)
110
111var mappingListScheduledJobsOperationType = map[string]ListScheduledJobsOperationTypeEnum{
112	"INSTALL":   ListScheduledJobsOperationTypeInstall,
113	"UPDATE":    ListScheduledJobsOperationTypeUpdate,
114	"REMOVE":    ListScheduledJobsOperationTypeRemove,
115	"UPDATEALL": ListScheduledJobsOperationTypeUpdateall,
116}
117
118// GetListScheduledJobsOperationTypeEnumValues Enumerates the set of values for ListScheduledJobsOperationTypeEnum
119func GetListScheduledJobsOperationTypeEnumValues() []ListScheduledJobsOperationTypeEnum {
120	values := make([]ListScheduledJobsOperationTypeEnum, 0)
121	for _, v := range mappingListScheduledJobsOperationType {
122		values = append(values, v)
123	}
124	return values
125}
126
127// ListScheduledJobsSortOrderEnum Enum with underlying type: string
128type ListScheduledJobsSortOrderEnum string
129
130// Set of constants representing the allowable values for ListScheduledJobsSortOrderEnum
131const (
132	ListScheduledJobsSortOrderAsc  ListScheduledJobsSortOrderEnum = "ASC"
133	ListScheduledJobsSortOrderDesc ListScheduledJobsSortOrderEnum = "DESC"
134)
135
136var mappingListScheduledJobsSortOrder = map[string]ListScheduledJobsSortOrderEnum{
137	"ASC":  ListScheduledJobsSortOrderAsc,
138	"DESC": ListScheduledJobsSortOrderDesc,
139}
140
141// GetListScheduledJobsSortOrderEnumValues Enumerates the set of values for ListScheduledJobsSortOrderEnum
142func GetListScheduledJobsSortOrderEnumValues() []ListScheduledJobsSortOrderEnum {
143	values := make([]ListScheduledJobsSortOrderEnum, 0)
144	for _, v := range mappingListScheduledJobsSortOrder {
145		values = append(values, v)
146	}
147	return values
148}
149
150// ListScheduledJobsSortByEnum Enum with underlying type: string
151type ListScheduledJobsSortByEnum string
152
153// Set of constants representing the allowable values for ListScheduledJobsSortByEnum
154const (
155	ListScheduledJobsSortByTimecreated ListScheduledJobsSortByEnum = "TIMECREATED"
156	ListScheduledJobsSortByDisplayname ListScheduledJobsSortByEnum = "DISPLAYNAME"
157)
158
159var mappingListScheduledJobsSortBy = map[string]ListScheduledJobsSortByEnum{
160	"TIMECREATED": ListScheduledJobsSortByTimecreated,
161	"DISPLAYNAME": ListScheduledJobsSortByDisplayname,
162}
163
164// GetListScheduledJobsSortByEnumValues Enumerates the set of values for ListScheduledJobsSortByEnum
165func GetListScheduledJobsSortByEnumValues() []ListScheduledJobsSortByEnum {
166	values := make([]ListScheduledJobsSortByEnum, 0)
167	for _, v := range mappingListScheduledJobsSortBy {
168		values = append(values, v)
169	}
170	return values
171}
172
173// ListScheduledJobsLifecycleStateEnum Enum with underlying type: string
174type ListScheduledJobsLifecycleStateEnum string
175
176// Set of constants representing the allowable values for ListScheduledJobsLifecycleStateEnum
177const (
178	ListScheduledJobsLifecycleStateCreating ListScheduledJobsLifecycleStateEnum = "CREATING"
179	ListScheduledJobsLifecycleStateUpdating ListScheduledJobsLifecycleStateEnum = "UPDATING"
180	ListScheduledJobsLifecycleStateActive   ListScheduledJobsLifecycleStateEnum = "ACTIVE"
181	ListScheduledJobsLifecycleStateDeleting ListScheduledJobsLifecycleStateEnum = "DELETING"
182	ListScheduledJobsLifecycleStateDeleted  ListScheduledJobsLifecycleStateEnum = "DELETED"
183	ListScheduledJobsLifecycleStateFailed   ListScheduledJobsLifecycleStateEnum = "FAILED"
184)
185
186var mappingListScheduledJobsLifecycleState = map[string]ListScheduledJobsLifecycleStateEnum{
187	"CREATING": ListScheduledJobsLifecycleStateCreating,
188	"UPDATING": ListScheduledJobsLifecycleStateUpdating,
189	"ACTIVE":   ListScheduledJobsLifecycleStateActive,
190	"DELETING": ListScheduledJobsLifecycleStateDeleting,
191	"DELETED":  ListScheduledJobsLifecycleStateDeleted,
192	"FAILED":   ListScheduledJobsLifecycleStateFailed,
193}
194
195// GetListScheduledJobsLifecycleStateEnumValues Enumerates the set of values for ListScheduledJobsLifecycleStateEnum
196func GetListScheduledJobsLifecycleStateEnumValues() []ListScheduledJobsLifecycleStateEnum {
197	values := make([]ListScheduledJobsLifecycleStateEnum, 0)
198	for _, v := range mappingListScheduledJobsLifecycleState {
199		values = append(values, v)
200	}
201	return values
202}
203
204// ListScheduledJobsOsFamilyEnum Enum with underlying type: string
205type ListScheduledJobsOsFamilyEnum string
206
207// Set of constants representing the allowable values for ListScheduledJobsOsFamilyEnum
208const (
209	ListScheduledJobsOsFamilyLinux   ListScheduledJobsOsFamilyEnum = "LINUX"
210	ListScheduledJobsOsFamilyWindows ListScheduledJobsOsFamilyEnum = "WINDOWS"
211	ListScheduledJobsOsFamilyAll     ListScheduledJobsOsFamilyEnum = "ALL"
212)
213
214var mappingListScheduledJobsOsFamily = map[string]ListScheduledJobsOsFamilyEnum{
215	"LINUX":   ListScheduledJobsOsFamilyLinux,
216	"WINDOWS": ListScheduledJobsOsFamilyWindows,
217	"ALL":     ListScheduledJobsOsFamilyAll,
218}
219
220// GetListScheduledJobsOsFamilyEnumValues Enumerates the set of values for ListScheduledJobsOsFamilyEnum
221func GetListScheduledJobsOsFamilyEnumValues() []ListScheduledJobsOsFamilyEnum {
222	values := make([]ListScheduledJobsOsFamilyEnum, 0)
223	for _, v := range mappingListScheduledJobsOsFamily {
224		values = append(values, v)
225	}
226	return values
227}
228