Package dev.cerbos.sdk
Class AddOrUpdateSchemaRequestBuilder
- java.lang.Object
-
- dev.cerbos.sdk.AddOrUpdateSchemaRequestBuilder
-
public class AddOrUpdateSchemaRequestBuilder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddOrUpdate()Execute the addOrUpdate callAddOrUpdateSchemaRequestBuilderwith(java.lang.Iterable<SchemaOuterClass.Schema> schemaList)Add a list of schemas to the batch.AddOrUpdateSchemaRequestBuilderwith(java.lang.String id, java.io.Reader schemaJson)Add a schema to the batch.AddOrUpdateSchemaRequestBuilderwith(java.lang.String id, java.lang.String schemaJson)Add a schema to the batch.
-
-
-
Method Detail
-
with
public AddOrUpdateSchemaRequestBuilder with(java.lang.String id, java.io.Reader schemaJson) throws java.io.IOException, io.envoyproxy.pgv.ValidationException
Add a schema to the batch.- Parameters:
id- Schema IDschemaJson- Reader for schema JSON- Returns:
- this
- Throws:
java.io.IOException- If the schema cannot be readio.envoyproxy.pgv.ValidationException- If the schema cannot be validated
-
with
public AddOrUpdateSchemaRequestBuilder with(java.lang.String id, java.lang.String schemaJson) throws java.io.IOException, io.envoyproxy.pgv.ValidationException
Add a schema to the batch.- Parameters:
id- Schema IDschemaJson- String containing the schema JSON- Returns:
- this
- Throws:
java.io.IOException- If the schema cannot be readio.envoyproxy.pgv.ValidationException- If the schema cannot be validated
-
with
public AddOrUpdateSchemaRequestBuilder with(java.lang.Iterable<SchemaOuterClass.Schema> schemaList) throws io.envoyproxy.pgv.ValidationException
Add a list of schemas to the batch.- Parameters:
schemaList- list ofSchemaOuterClass.Schema- Returns:
- this
- Throws:
io.envoyproxy.pgv.ValidationException- if any of the schemas is invalid
-
addOrUpdate
public void addOrUpdate()
Execute the addOrUpdate call- Throws:
CerbosException- is the call fails
-
-