TargetBranchConfiguration Class

  • java.lang.Object
    • com.azure.resourcemanager.security.models.TargetBranchConfiguration

Implements

public final class TargetBranchConfiguration
implements JsonSerializable<TargetBranchConfiguration>

Repository branch configuration for PR Annotations.

Constructor Summary

Constructor Description
TargetBranchConfiguration()

Creates an instance of TargetBranchConfiguration class.

Method Summary

Modifier and Type Method and Description
AnnotateDefaultBranchState annotateDefaultBranch()

Get the annotateDefaultBranch property: Configuration of PR Annotations on default branch.

List<String> branchNames()

Get the branchNames property: Gets or sets branches that should have annotations.

static TargetBranchConfiguration fromJson(JsonReader jsonReader)

Reads an instance of TargetBranchConfiguration from the JsonReader.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

TargetBranchConfiguration withAnnotateDefaultBranch(AnnotateDefaultBranchState annotateDefaultBranch)

Set the annotateDefaultBranch property: Configuration of PR Annotations on default branch.

TargetBranchConfiguration withBranchNames(List<String> branchNames)

Set the branchNames property: Gets or sets branches that should have annotations.

Methods inherited from java.lang.Object

Constructor Details

TargetBranchConfiguration

public TargetBranchConfiguration()

Creates an instance of TargetBranchConfiguration class.

Method Details

annotateDefaultBranch

public AnnotateDefaultBranchState annotateDefaultBranch()

Get the annotateDefaultBranch property: Configuration of PR Annotations on default branch. Enabled - PR Annotations are enabled on the resource's default branch. Disabled - PR Annotations are disabled on the resource's default branch.

Returns:

the annotateDefaultBranch value.

branchNames

public List<String> branchNames()

Get the branchNames property: Gets or sets branches that should have annotations.

Returns:

the branchNames value.

fromJson

public static TargetBranchConfiguration fromJson(JsonReader jsonReader)

Reads an instance of TargetBranchConfiguration from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withAnnotateDefaultBranch

public TargetBranchConfiguration withAnnotateDefaultBranch(AnnotateDefaultBranchState annotateDefaultBranch)

Set the annotateDefaultBranch property: Configuration of PR Annotations on default branch. Enabled - PR Annotations are enabled on the resource's default branch. Disabled - PR Annotations are disabled on the resource's default branch.

Parameters:

annotateDefaultBranch - the annotateDefaultBranch value to set.

Returns:

the TargetBranchConfiguration object itself.

withBranchNames

public TargetBranchConfiguration withBranchNames(List<String> branchNames)

Set the branchNames property: Gets or sets branches that should have annotations.

Parameters:

branchNames - the branchNames value to set.

Returns:

the TargetBranchConfiguration object itself.

Applies to