Class SqlTriggerResource
java.lang.Object
com.azure.resourcemanager.cosmos.models.SqlTriggerResource
- All Implemented Interfaces:
com.azure.json.JsonSerializable<SqlTriggerResource>
- Direct Known Subclasses:
SqlTriggerGetPropertiesResource
public class SqlTriggerResource
extends Object
implements com.azure.json.JsonSerializable<SqlTriggerResource>
Cosmos DB SQL trigger resource object.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbody()
Get the body property: Body of the Trigger.static SqlTriggerResource
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of SqlTriggerResource from the JsonReader.id()
Get the id property: Name of the Cosmos DB SQL trigger.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) Get the triggerOperation property: The operation the trigger is associated with.Get the triggerType property: Type of the Trigger.void
validate()
Validates the instance.Set the body property: Body of the Trigger.Set the id property: Name of the Cosmos DB SQL trigger.withTriggerOperation
(TriggerOperation triggerOperation) Set the triggerOperation property: The operation the trigger is associated with.withTriggerType
(TriggerType triggerType) Set the triggerType property: Type of the Trigger.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
SqlTriggerResource
public SqlTriggerResource()Creates an instance of SqlTriggerResource class.
-
-
Method Details
-
id
Get the id property: Name of the Cosmos DB SQL trigger.- Returns:
- the id value.
-
withId
Set the id property: Name of the Cosmos DB SQL trigger.- Parameters:
id
- the id value to set.- Returns:
- the SqlTriggerResource object itself.
-
body
Get the body property: Body of the Trigger.- Returns:
- the body value.
-
withBody
Set the body property: Body of the Trigger.- Parameters:
body
- the body value to set.- Returns:
- the SqlTriggerResource object itself.
-
triggerType
Get the triggerType property: Type of the Trigger.- Returns:
- the triggerType value.
-
withTriggerType
Set the triggerType property: Type of the Trigger.- Parameters:
triggerType
- the triggerType value to set.- Returns:
- the SqlTriggerResource object itself.
-
triggerOperation
Get the triggerOperation property: The operation the trigger is associated with.- Returns:
- the triggerOperation value.
-
withTriggerOperation
Set the triggerOperation property: The operation the trigger is associated with.- Parameters:
triggerOperation
- the triggerOperation value to set.- Returns:
- the SqlTriggerResource object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<SqlTriggerResource>
- Throws:
IOException
-
fromJson
Reads an instance of SqlTriggerResource from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of SqlTriggerResource if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException
- If the deserialized JSON object was missing any required properties.IOException
- If an error occurs while reading the SqlTriggerResource.
-