CreateOrUpdateProtectedBranchDetails

class oci.devops.models.CreateOrUpdateProtectedBranchDetails(**kwargs)

Bases: object

Information to create a protected branch

Attributes

PROTECTION_LEVELS_PULL_REQUEST_MERGE_ONLY A constant which can be used with the protection_levels property of a CreateOrUpdateProtectedBranchDetails.
PROTECTION_LEVELS_READ_ONLY A constant which can be used with the protection_levels property of a CreateOrUpdateProtectedBranchDetails.
branch_name [Required] Gets the branch_name of this CreateOrUpdateProtectedBranchDetails.
protection_levels Gets the protection_levels of this CreateOrUpdateProtectedBranchDetails.

Methods

__init__(**kwargs) Initializes a new CreateOrUpdateProtectedBranchDetails object with values from keyword arguments.
PROTECTION_LEVELS_PULL_REQUEST_MERGE_ONLY = 'PULL_REQUEST_MERGE_ONLY'

A constant which can be used with the protection_levels property of a CreateOrUpdateProtectedBranchDetails. This constant has a value of “PULL_REQUEST_MERGE_ONLY”

PROTECTION_LEVELS_READ_ONLY = 'READ_ONLY'

A constant which can be used with the protection_levels property of a CreateOrUpdateProtectedBranchDetails. This constant has a value of “READ_ONLY”

__init__(**kwargs)

Initializes a new CreateOrUpdateProtectedBranchDetails object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • branch_name (str) – The value to assign to the branch_name property of this CreateOrUpdateProtectedBranchDetails.
  • protection_levels (list[str]) – The value to assign to the protection_levels property of this CreateOrUpdateProtectedBranchDetails. Allowed values for items in this list are: “READ_ONLY”, “PULL_REQUEST_MERGE_ONLY”
branch_name

[Required] Gets the branch_name of this CreateOrUpdateProtectedBranchDetails. Name of a branch to protect.

Returns:The branch_name of this CreateOrUpdateProtectedBranchDetails.
Return type:str
protection_levels

Gets the protection_levels of this CreateOrUpdateProtectedBranchDetails. Level of protection to add on a branch.

Allowed values for items in this list are: “READ_ONLY”, “PULL_REQUEST_MERGE_ONLY”

Returns:The protection_levels of this CreateOrUpdateProtectedBranchDetails.
Return type:list[str]