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 Details

    • SqlTriggerResource

      public SqlTriggerResource()
      Creates an instance of SqlTriggerResource class.
  • Method Details

    • id

      public String id()
      Get the id property: Name of the Cosmos DB SQL trigger.
      Returns:
      the id value.
    • withId

      public SqlTriggerResource withId(String id)
      Set the id property: Name of the Cosmos DB SQL trigger.
      Parameters:
      id - the id value to set.
      Returns:
      the SqlTriggerResource object itself.
    • body

      public String body()
      Get the body property: Body of the Trigger.
      Returns:
      the body value.
    • withBody

      public SqlTriggerResource withBody(String body)
      Set the body property: Body of the Trigger.
      Parameters:
      body - the body value to set.
      Returns:
      the SqlTriggerResource object itself.
    • triggerType

      public TriggerType triggerType()
      Get the triggerType property: Type of the Trigger.
      Returns:
      the triggerType value.
    • withTriggerType

      public SqlTriggerResource withTriggerType(TriggerType triggerType)
      Set the triggerType property: Type of the Trigger.
      Parameters:
      triggerType - the triggerType value to set.
      Returns:
      the SqlTriggerResource object itself.
    • triggerOperation

      public TriggerOperation triggerOperation()
      Get the triggerOperation property: The operation the trigger is associated with.
      Returns:
      the triggerOperation value.
    • withTriggerOperation

      public SqlTriggerResource withTriggerOperation(TriggerOperation triggerOperation)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<SqlTriggerResource>
      Throws:
      IOException
    • fromJson

      public static SqlTriggerResource fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.