-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OCM-6763] Add default capability resource to SDK
- Loading branch information
Liran Roitman
committed
Mar 17, 2024
1 parent
a7857be
commit ab6dbd6
Showing
5 changed files
with
125 additions
and
0 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
model/accounts_mgmt/v1/default_capabilities_resource.model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
resource DefaultCapabilities{ | ||
// Retrieves a list of Dedfault Capabilities. | ||
method List { | ||
// Index of the requested page, where one corresponds to the first page. | ||
in out Page Integer = 1 | ||
|
||
// Maximum number of items that will be contained in the returned page. | ||
in out Size Integer = 100 | ||
|
||
// Total number of items of the collection that match the search criteria, | ||
// regardless of the size of the page. | ||
out Total Integer | ||
|
||
// Search criteria. | ||
// | ||
// The syntax of this parameter is similar to the syntax of the _where_ clause | ||
// of an SQL statement, but using the names of the attributes of the organization | ||
// instead of the names of the columns of a table. For example, in order to | ||
// retrieve organizations with name starting with my: | ||
// | ||
// ```sql | ||
// name like 'my%' | ||
// ``` | ||
// | ||
// If the parameter isn't provided, or if the value is empty, then all the | ||
// items that the user has permission to see will be returned. | ||
in Search String | ||
|
||
// Retrieved list of Default Capabilities. | ||
out Items []DefaultCapability | ||
} | ||
|
||
// Creates a new default capability. | ||
method Add { | ||
// Default capability data. | ||
in out Body DefaultCapability | ||
} | ||
|
||
// Reference to the service that manages an specific default capability. | ||
locator DefaultCapability { | ||
target DefaultCapability | ||
variable Name | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
Copyright (c) 2024 Red Hat, Inc. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
// Default Capability model that represents default internal labels with a key-value pair. | ||
struct DefaultCapabilities { | ||
// Name of the capability label. | ||
Name String | ||
// Value that can be assigned to the capability (eg. "true", "false" etc). | ||
Value String | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
Copyright (c) 2024 Red Hat, Inc. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
// Manages a specific default capability. | ||
resource DefaultCapability { | ||
// Retrieves the details of the default capability. | ||
method Get { | ||
out Body DefaultCapability | ||
} | ||
|
||
// Updates the default capability. | ||
method Update { | ||
in out Body DefaultCapability | ||
} | ||
|
||
method Delete { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
Copyright (c) 2024 Red Hat, Inc. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
class DefaultCapability { | ||
// Name of the default capability (the key). | ||
Name String | ||
// Value of the default capability. | ||
Value String | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters