Class SourceTriggerDescriptor
java.lang.Object
com.azure.resourcemanager.containerregistry.models.SourceTriggerDescriptor
- All Implemented Interfaces:
com.azure.json.JsonSerializable<SourceTriggerDescriptor>
public final class SourceTriggerDescriptor
extends Object
implements com.azure.json.JsonSerializable<SourceTriggerDescriptor>
The source trigger that caused a run.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of SourceTriggerDescriptor class. -
Method Summary
Modifier and TypeMethodDescriptionGet the branchName property: The branch name in the repository.commitId()Get the commitId property: The unique ID that identifies a commit.Get the eventType property: The event type of the trigger.static SourceTriggerDescriptorfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of SourceTriggerDescriptor from the JsonReader.id()Get the id property: The unique ID of the trigger.Get the providerType property: The source control provider type.Get the pullRequestId property: The unique ID that identifies pull request.Get the repositoryUrl property: The repository URL.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withBranchName(String branchName) Set the branchName property: The branch name in the repository.withCommitId(String commitId) Set the commitId property: The unique ID that identifies a commit.withEventType(String eventType) Set the eventType property: The event type of the trigger.Set the id property: The unique ID of the trigger.withProviderType(String providerType) Set the providerType property: The source control provider type.withPullRequestId(String pullRequestId) Set the pullRequestId property: The unique ID that identifies pull request.withRepositoryUrl(String repositoryUrl) Set the repositoryUrl property: The repository URL.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
SourceTriggerDescriptor
public SourceTriggerDescriptor()Creates an instance of SourceTriggerDescriptor class.
-
-
Method Details
-
id
Get the id property: The unique ID of the trigger.- Returns:
- the id value.
-
withId
Set the id property: The unique ID of the trigger.- Parameters:
id- the id value to set.- Returns:
- the SourceTriggerDescriptor object itself.
-
eventType
Get the eventType property: The event type of the trigger.- Returns:
- the eventType value.
-
withEventType
Set the eventType property: The event type of the trigger.- Parameters:
eventType- the eventType value to set.- Returns:
- the SourceTriggerDescriptor object itself.
-
commitId
Get the commitId property: The unique ID that identifies a commit.- Returns:
- the commitId value.
-
withCommitId
Set the commitId property: The unique ID that identifies a commit.- Parameters:
commitId- the commitId value to set.- Returns:
- the SourceTriggerDescriptor object itself.
-
pullRequestId
Get the pullRequestId property: The unique ID that identifies pull request.- Returns:
- the pullRequestId value.
-
withPullRequestId
Set the pullRequestId property: The unique ID that identifies pull request.- Parameters:
pullRequestId- the pullRequestId value to set.- Returns:
- the SourceTriggerDescriptor object itself.
-
repositoryUrl
Get the repositoryUrl property: The repository URL.- Returns:
- the repositoryUrl value.
-
withRepositoryUrl
Set the repositoryUrl property: The repository URL.- Parameters:
repositoryUrl- the repositoryUrl value to set.- Returns:
- the SourceTriggerDescriptor object itself.
-
branchName
Get the branchName property: The branch name in the repository.- Returns:
- the branchName value.
-
withBranchName
Set the branchName property: The branch name in the repository.- Parameters:
branchName- the branchName value to set.- Returns:
- the SourceTriggerDescriptor object itself.
-
providerType
Get the providerType property: The source control provider type.- Returns:
- the providerType value.
-
withProviderType
Set the providerType property: The source control provider type.- Parameters:
providerType- the providerType value to set.- Returns:
- the SourceTriggerDescriptor object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<SourceTriggerDescriptor>- Throws:
IOException
-
fromJson
public static SourceTriggerDescriptor fromJson(com.azure.json.JsonReader jsonReader) throws IOException 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.
-