Partilhar via


SqlTriggerResource Class

  • java.lang.Object
    • com.azure.resourcemanager.cosmos.models.SqlTriggerResource

Implements

public class SqlTriggerResource
implements JsonSerializable<SqlTriggerResource>

Cosmos DB SQL trigger resource object.

Constructor Summary

Constructor Description
SqlTriggerResource()

Creates an instance of SqlTriggerResource class.

Method Summary

Modifier and Type Method and Description
String body()

Get the body property: Body of the Trigger.

static SqlTriggerResource fromJson(JsonReader jsonReader)

Reads an instance of SqlTriggerResource from the JsonReader.

String id()

Get the id property: Name of the Cosmos DB SQL trigger.

JsonWriter toJson(JsonWriter jsonWriter)
TriggerOperation triggerOperation()

Get the triggerOperation property: The operation the trigger is associated with.

TriggerType triggerType()

Get the triggerType property: Type of the Trigger.

void validate()

Validates the instance.

SqlTriggerResource withBody(String body)

Set the body property: Body of the Trigger.

SqlTriggerResource withId(String id)

Set the id property: Name of the Cosmos DB SQL trigger.

SqlTriggerResource withTriggerOperation(TriggerOperation triggerOperation)

Set the triggerOperation property: The operation the trigger is associated with.

SqlTriggerResource withTriggerType(TriggerType triggerType)

Set the triggerType property: Type of the Trigger.

Methods inherited from java.lang.Object

Constructor Details

SqlTriggerResource

public SqlTriggerResource()

Creates an instance of SqlTriggerResource class.

Method Details

body

public String body()

Get the body property: Body of the Trigger.

Returns:

the body value.

fromJson

public static SqlTriggerResource fromJson(JsonReader jsonReader)

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:

IOException

- If the deserialized JSON object was missing any required properties.

id

public String id()

Get the id property: Name of the Cosmos DB SQL trigger.

Returns:

the id value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

triggerOperation

public TriggerOperation triggerOperation()

Get the triggerOperation property: The operation the trigger is associated with.

Returns:

the triggerOperation value.

triggerType

public TriggerType triggerType()

Get the triggerType property: Type of the Trigger.

Returns:

the triggerType value.

validate

public void validate()

Validates the instance.

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.

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.

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.

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.

Applies to