@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen") @Beta public class RulesApi extends AbstractOpenApiService
apiClient
Constructor and Description |
---|
RulesApi(ApiClient apiClient)
Instantiates this API class to invoke operations on the Rule Authoring API for Cloud Foundry based on a given
ApiClient . |
RulesApi(HttpDestinationProperties httpDestination)
Instantiates this API class to invoke operations on the Rule Authoring API for Cloud Foundry.
|
Modifier and Type | Method and Description |
---|---|
RuleObject |
addRule(String id,
RuleObject body)
Create a rule
|
OpenApiResponse |
deleteRule(String id,
String objectId)
Delete a rule of a project
|
RuleObject |
readRevisionedRules(String id,
String revision)
Retrieve all the rules of the highest semantic version of a project for a given revision.
|
RuleObject |
readRevisionedRules(String id,
String revision,
List<String> name)
Retrieve all the rules of the highest semantic version of a project for a given revision.
|
RuleObject |
readRule(String id,
String objectId)
Retrieve a rule of a project
|
List<RuleObject> |
readRules(String id)
Retrieve all the rules of a project
|
List<RuleObject> |
readRules(String id,
List<String> name,
Integer $skip,
Integer $top)
Retrieve all the rules of a project
|
RuleObject |
readVersionedRules(String id,
String version)
Retrieve all the rules of a project given version id
|
RuleObject |
readVersionedRules(String id,
String version,
List<String> name)
Retrieve all the rules of a project given version id
|
RuleObject |
updateRule(String id,
String objectId)
Updates a rule of a project
|
RuleObject |
updateRule(String id,
String objectId,
RuleObject body)
Updates a rule of a project
|
public RulesApi(@Nonnull HttpDestinationProperties httpDestination)
httpDestination
- The destination that API should be used with@Nullable public RuleObject addRule(@Nonnull String id, @Nonnull RuleObject body) throws OpenApiRequestException
Create a rule
Creates a rule for the project with the specified project ID.
201 - Created. The rule has been added successfully to the given project.
400 - Bad Request. ID of the project in the URL path and in JSON payload does not match.
401 - Unauthorized. User does not have required authorization to execute this request.
409 - Conflict. A rule with name specified in JSON payload already exists in the given project.
id
- The project ID to which the rule should be added. The ID is 32 characters long.body
- A rule can be of type decision table(DT) or text rule(TR). At a time, only one type of rule can be
created based on the 'type' property in the json. If the type is provided as 'DT' in
the json, it will refer to the 'DecisionTable' property in the payload and a rule of type
'DecisionTable' will be created. Similarly, if the 'type' is changed to 'TR',
it refers to the 'Text' property for creating a rule of type 'TextRule'. This example
contains both 'DecisionTable' and 'Text' properties for syntax references .OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nonnull public OpenApiResponse deleteRule(@Nonnull String id, @Nonnull String objectId) throws OpenApiRequestException
Delete a rule of a project
Deletes the rule with the specified rule ID of the project with the specified project ID.
204 - Rule deleted successfully from the given project.
401 - Unauthorized. User does not have required authorization to execute this request.
404 - Object not found. The entity you are trying to delete does not exist.
id
- ID of the project from which the rule should be deleted. The ID is 32 characters long.objectId
- ID of the data object. The ID is 32 characters long.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public RuleObject readRevisionedRules(@Nonnull String id, @Nonnull String revision, @Nullable List<String> name) throws OpenApiRequestException
Retrieve all the rules of the highest semantic version of a project for a given revision.
Retrieves all the rules of the highest semantic version of a project for a given revision.
200 - Request for reading revisioned rules of a given project is completed.
401 - Unauthorized. User does not have required authorization to execute this request.
404 - Project not found. The project you are trying to read does not exist.
id
- (Required) ID of the project. The ID is 32 characters long.revision
- (Required) Revision of the project.name
- (Optional The name of the rule. Retrieves the rule with the specified name. You can provide multiple
names to retrieve multiple rules.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public RuleObject readRevisionedRules(@Nonnull String id, @Nonnull String revision) throws OpenApiRequestException
Retrieve all the rules of the highest semantic version of a project for a given revision.
Retrieves all the rules of the highest semantic version of a project for a given revision.
200 - Request for reading revisioned rules of a given project is completed.
401 - Unauthorized. User does not have required authorization to execute this request.
404 - Project not found. The project you are trying to read does not exist.
id
- ID of the project. The ID is 32 characters long.revision
- Revision of the project.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public RuleObject readRule(@Nonnull String id, @Nonnull String objectId) throws OpenApiRequestException
Retrieve a rule of a project
Retrieves the rule of the project with the specified project ID.
200 - Request for reading the rule belonging to the given project is completed successfully.
401 - Unauthorized. User does not have required authorization to execute this request.
404 - Project not found. The project you are trying to read does not exist.
id
- ID of the project. The ID is 32 characters long.objectId
- ID of the rule. The ID is 32 characters long.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public List<RuleObject> readRules(@Nonnull String id, @Nullable List<String> name, @Nullable Integer $skip, @Nullable Integer $top) throws OpenApiRequestException
Retrieve all the rules of a project
Retrieves the rules of a project with the specified project ID.
200 - Request for reading the rules belonging to the given project is completed successfully.
401 - Unauthorized. User does not have required authorization to execute this request.
404 - Project not found. The project you are trying to read does not exist.
id
- (Required) ID of the project. The ID is 32 characters long.name
- (Optional The name of the rule. Retrieves the rule with the specified name. You can provide multiple
names to retrieve multiple rules.$skip
- (Optional, default to 0) The number of rules you want to skip from the beginning while fetching them.
If $skip is not specified, no rules are skipped. The records are implicitly sorted by the rule name in
ascending order. You can use this parameter only once. For example: To fetch the rules
starting from 101 until 150, set $skip=100 and $top=50. Also, refer to the $top parameter.$top
- (Optional, default to 100) The number of rules you want to fetch from the beginning. If not specified,
100 rules are returned. The records are implicitly sorted by the rule name in ascending order. You can
use this parameter only once. For example: To fetch the rules starting from 101 until 150, set
$skip=100 and $top=50. Also, refer to the $skip parameter.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public List<RuleObject> readRules(@Nonnull String id) throws OpenApiRequestException
Retrieve all the rules of a project
Retrieves the rules of a project with the specified project ID.
200 - Request for reading the rules belonging to the given project is completed successfully.
401 - Unauthorized. User does not have required authorization to execute this request.
404 - Project not found. The project you are trying to read does not exist.
id
- ID of the project. The ID is 32 characters long.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public RuleObject readVersionedRules(@Nonnull String id, @Nonnull String version, @Nullable List<String> name) throws OpenApiRequestException
Retrieve all the rules of a project given version id
Retrieves all the rules given version id with the specified project ID.
200 - Request for reading versioned rules belonging to a given project is completed successfully.
401 - Unauthorized. User does not have required authorization to execute this request.
404 - Project not found. The project you are trying to read does not exist.
id
- (Required) ID of the project. The ID is 32 characters long.version
- (Required) Version ID of the project. The ID is 18 digits long.name
- (Optional The name of the rule. Retrieves the rule with the specified name. You can provide multiple
names to retrieve multiple rules.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public RuleObject readVersionedRules(@Nonnull String id, @Nonnull String version) throws OpenApiRequestException
Retrieve all the rules of a project given version id
Retrieves all the rules given version id with the specified project ID.
200 - Request for reading versioned rules belonging to a given project is completed successfully.
401 - Unauthorized. User does not have required authorization to execute this request.
404 - Project not found. The project you are trying to read does not exist.
id
- ID of the project. The ID is 32 characters long.version
- Version ID of the project. The ID is 18 digits long.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public RuleObject updateRule(@Nonnull String id, @Nonnull String objectId, @Nullable RuleObject body) throws OpenApiRequestException
Updates a rule of a project
Updates the rule with the specified rule ID of the project with the specified project ID.
200 - Request to update the rule belonging to a given project is completed successfully.
400 - Bad Request. ID of the project or of the rule provided in the URL path and in JSON payload do not match.
401 - Unauthorized. User does not have required authorization to execute this request.
404 - Object not found. The entity you are trying to update does not exist.
409 - Conflict. A rule with name specified in JSON payload already exists in the given project.
id
- (Required) ID of the project. The ID is 32 characters long.objectId
- (Required) ID of the rule. The ID is 32 characters long.body
- (Optional) JSON payload of the rule.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public RuleObject updateRule(@Nonnull String id, @Nonnull String objectId) throws OpenApiRequestException
Updates a rule of a project
Updates the rule with the specified rule ID of the project with the specified project ID.
200 - Request to update the rule belonging to a given project is completed successfully.
400 - Bad Request. ID of the project or of the rule provided in the URL path and in JSON payload do not match.
401 - Unauthorized. User does not have required authorization to execute this request.
404 - Object not found. The entity you are trying to update does not exist.
409 - Conflict. A rule with name specified in JSON payload already exists in the given project.
id
- ID of the project. The ID is 32 characters long.objectId
- ID of the rule. The ID is 32 characters long.OpenApiRequestException
- if an error occurs while attempting to invoke the APICopyright © 2021 SAP SE. All rights reserved.