Partilhar via


SourceTriggerDescriptor Class

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

Implements

public final class SourceTriggerDescriptor
implements JsonSerializable<SourceTriggerDescriptor>

The source trigger that caused a run.

Constructor Summary

Constructor Description
SourceTriggerDescriptor()

Creates an instance of SourceTriggerDescriptor class.

Method Summary

Modifier and Type Method and Description
String branchName()

Get the branchName property: The branch name in the repository.

String commitId()

Get the commitId property: The unique ID that identifies a commit.

String eventType()

Get the eventType property: The event type of the trigger.

static SourceTriggerDescriptor fromJson(JsonReader jsonReader)

Reads an instance of SourceTriggerDescriptor from the JsonReader.

String id()

Get the id property: The unique ID of the trigger.

String providerType()

Get the providerType property: The source control provider type.

String pullRequestId()

Get the pullRequestId property: The unique ID that identifies pull request.

String repositoryUrl()

Get the repositoryUrl property: The repository URL.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

SourceTriggerDescriptor withBranchName(String branchName)

Set the branchName property: The branch name in the repository.

SourceTriggerDescriptor withCommitId(String commitId)

Set the commitId property: The unique ID that identifies a commit.

SourceTriggerDescriptor withEventType(String eventType)

Set the eventType property: The event type of the trigger.

SourceTriggerDescriptor withId(String id)

Set the id property: The unique ID of the trigger.

SourceTriggerDescriptor withProviderType(String providerType)

Set the providerType property: The source control provider type.

SourceTriggerDescriptor withPullRequestId(String pullRequestId)

Set the pullRequestId property: The unique ID that identifies pull request.

SourceTriggerDescriptor withRepositoryUrl(String repositoryUrl)

Set the repositoryUrl property: The repository URL.

Methods inherited from java.lang.Object

Constructor Details

SourceTriggerDescriptor

public SourceTriggerDescriptor()

Creates an instance of SourceTriggerDescriptor class.

Method Details

branchName

public String branchName()

Get the branchName property: The branch name in the repository.

Returns:

the branchName value.

commitId

public String commitId()

Get the commitId property: The unique ID that identifies a commit.

Returns:

the commitId value.

eventType

public String eventType()

Get the eventType property: The event type of the trigger.

Returns:

the eventType value.

fromJson

public static SourceTriggerDescriptor fromJson(JsonReader jsonReader)

Reads an instance of SourceTriggerDescriptor from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of SourceTriggerDescriptor if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the SourceTriggerDescriptor.

id

public String id()

Get the id property: The unique ID of the trigger.

Returns:

the id value.

providerType

public String providerType()

Get the providerType property: The source control provider type.

Returns:

the providerType value.

pullRequestId

public String pullRequestId()

Get the pullRequestId property: The unique ID that identifies pull request.

Returns:

the pullRequestId value.

repositoryUrl

public String repositoryUrl()

Get the repositoryUrl property: The repository URL.

Returns:

the repositoryUrl value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withBranchName

public SourceTriggerDescriptor withBranchName(String branchName)

Set the branchName property: The branch name in the repository.

Parameters:

branchName - the branchName value to set.

Returns:

the SourceTriggerDescriptor object itself.

withCommitId

public SourceTriggerDescriptor withCommitId(String commitId)

Set the commitId property: The unique ID that identifies a commit.

Parameters:

commitId - the commitId value to set.

Returns:

the SourceTriggerDescriptor object itself.

withEventType

public SourceTriggerDescriptor withEventType(String eventType)

Set the eventType property: The event type of the trigger.

Parameters:

eventType - the eventType value to set.

Returns:

the SourceTriggerDescriptor object itself.

withId

public SourceTriggerDescriptor withId(String id)

Set the id property: The unique ID of the trigger.

Parameters:

id - the id value to set.

Returns:

the SourceTriggerDescriptor object itself.

withProviderType

public SourceTriggerDescriptor withProviderType(String providerType)

Set the providerType property: The source control provider type.

Parameters:

providerType - the providerType value to set.

Returns:

the SourceTriggerDescriptor object itself.

withPullRequestId

public SourceTriggerDescriptor withPullRequestId(String pullRequestId)

Set the pullRequestId property: The unique ID that identifies pull request.

Parameters:

pullRequestId - the pullRequestId value to set.

Returns:

the SourceTriggerDescriptor object itself.

withRepositoryUrl

public SourceTriggerDescriptor withRepositoryUrl(String repositoryUrl)

Set the repositoryUrl property: The repository URL.

Parameters:

repositoryUrl - the repositoryUrl value to set.

Returns:

the SourceTriggerDescriptor object itself.

Applies to