Skip to content

Commit f392204

Browse files
committed
OCM-7800 | Define and add pagination model to cloud_provider_inquiries
Signed-off-by: Chetan Giradkar <[email protected]>
1 parent 74b975a commit f392204

File tree

3 files changed

+109
-0
lines changed

3 files changed

+109
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
Copyright (c) 2024 Red Hat, Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
// Pagination contains the data which enables pagination on the response
18+
struct Pagination {
19+
Page Integer
20+
Size Integer
21+
Search String
22+
Order String
23+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/*
2+
Copyright (c) 2024 Red Hat, Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
// Manages the cloud provider data of a cluster.
18+
resource CloudProvidersData {
19+
// Retrieves the list of cloud provider data.
20+
method List {
21+
// Index of the requested page, where one corresponds to the first page.
22+
in out Page Integer = 1
23+
24+
// Number of items contained in the returned page.
25+
in out Size Integer = 100
26+
27+
// Search criteria.
28+
//
29+
// The syntax of this parameter is similar to the syntax of the _where_ clause of a
30+
// SQL statement, but using the names of the attributes of the break glass credentials
31+
// instead of the names of the columns of a table. For example, in order to retrieve all
32+
// the credentials with a specific username and status the following is required:
33+
//
34+
// ```sql
35+
// username='user1' AND status='expired'
36+
// ```
37+
//
38+
// If the parameter isn't provided, or if the value is empty, then all the
39+
// break glass credentials that the user has permission to see will be returned.
40+
in Search String
41+
42+
// Order criteria.
43+
//
44+
// The syntax of this parameter is similar to the syntax of the _order by_ clause of
45+
// a SQL statement, but using the names of the attributes of the break glass credentials
46+
// instead of the the names of the columns of a table. For example, in order to sort the
47+
// credentials descending by identifier the value should be:
48+
//
49+
// ```sql
50+
// id desc
51+
// ```
52+
//
53+
// If the parameter isn't provided, or if the value is empty, then the order of the
54+
// results is undefined.
55+
in Order String
56+
57+
// Total number of items of the collection.
58+
out Total Integer
59+
60+
// Retrieved list of cloud provider data.
61+
out Items []CloudProviderData
62+
}
63+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
Copyright (c) 2024 Red Hat, Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
// Manages a specific cloud provider data.
18+
resource CloudProviderData {
19+
// Retrieves the details of the cloud provider data.
20+
method Get {
21+
out Body CloudProviderData
22+
}
23+
}

0 commit comments

Comments
 (0)