SourceTrigger Class

  • java.lang.Object
    • com.azure.resourcemanager.containerregistry.models.SourceTrigger

Implements

public final class SourceTrigger
implements JsonSerializable<SourceTrigger>

The properties of a source based trigger.

Constructor Summary

Constructor Description
SourceTrigger()

Creates an instance of SourceTrigger class.

Method Summary

Modifier and Type Method and Description
static SourceTrigger fromJson(JsonReader jsonReader)

Reads an instance of SourceTrigger from the JsonReader.

String name()

Get the name property: The name of the trigger.

SourceProperties sourceRepository()

Get the sourceRepository property: The properties that describes the source(code) for the task.

List<SourceTriggerEvent> sourceTriggerEvents()

Get the sourceTriggerEvents property: The source event corresponding to the trigger.

TriggerStatus status()

Get the status property: The current status of trigger.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

SourceTrigger withName(String name)

Set the name property: The name of the trigger.

SourceTrigger withSourceRepository(SourceProperties sourceRepository)

Set the sourceRepository property: The properties that describes the source(code) for the task.

SourceTrigger withSourceTriggerEvents(List<SourceTriggerEvent> sourceTriggerEvents)

Set the sourceTriggerEvents property: The source event corresponding to the trigger.

SourceTrigger withStatus(TriggerStatus status)

Set the status property: The current status of trigger.

Methods inherited from java.lang.Object

Constructor Details

SourceTrigger

public SourceTrigger()

Creates an instance of SourceTrigger class.

Method Details

fromJson

public static SourceTrigger fromJson(JsonReader jsonReader)

Reads an instance of SourceTrigger from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of SourceTrigger 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.

name

public String name()

Get the name property: The name of the trigger.

Returns:

the name value.

sourceRepository

public SourceProperties sourceRepository()

Get the sourceRepository property: The properties that describes the source(code) for the task.

Returns:

the sourceRepository value.

sourceTriggerEvents

public List sourceTriggerEvents()

Get the sourceTriggerEvents property: The source event corresponding to the trigger.

Returns:

the sourceTriggerEvents value.

status

public TriggerStatus status()

Get the status property: The current status of trigger.

Returns:

the status value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withName

public SourceTrigger withName(String name)

Set the name property: The name of the trigger.

Parameters:

name - the name value to set.

Returns:

the SourceTrigger object itself.

withSourceRepository

public SourceTrigger withSourceRepository(SourceProperties sourceRepository)

Set the sourceRepository property: The properties that describes the source(code) for the task.

Parameters:

sourceRepository - the sourceRepository value to set.

Returns:

the SourceTrigger object itself.

withSourceTriggerEvents

public SourceTrigger withSourceTriggerEvents(List sourceTriggerEvents)

Set the sourceTriggerEvents property: The source event corresponding to the trigger.

Parameters:

sourceTriggerEvents - the sourceTriggerEvents value to set.

Returns:

the SourceTrigger object itself.

withStatus

public SourceTrigger withStatus(TriggerStatus status)

Set the status property: The current status of trigger.

Parameters:

status - the status value to set.

Returns:

the SourceTrigger object itself.

Applies to