ProtectedBranch¶
-
class
oci.devops.models.
ProtectedBranch
(**kwargs)¶ Bases:
object
Holds information used to restrict certain actions on branches
Attributes
PROTECTION_LEVELS_PULL_REQUEST_MERGE_ONLY
A constant which can be used with the protection_levels property of a ProtectedBranch. PROTECTION_LEVELS_READ_ONLY
A constant which can be used with the protection_levels property of a ProtectedBranch. branch_name
[Required] Gets the branch_name of this ProtectedBranch. defined_tags
Gets the defined_tags of this ProtectedBranch. freeform_tags
Gets the freeform_tags of this ProtectedBranch. protection_levels
[Required] Gets the protection_levels of this ProtectedBranch. Methods
__init__
(**kwargs)Initializes a new ProtectedBranch 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 ProtectedBranch. 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 ProtectedBranch. This constant has a value of “READ_ONLY”
-
__init__
(**kwargs)¶ Initializes a new ProtectedBranch 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 ProtectedBranch.
- protection_levels (list[str]) – The value to assign to the protection_levels property of this ProtectedBranch. Allowed values for items in this list are: “READ_ONLY”, “PULL_REQUEST_MERGE_ONLY”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this ProtectedBranch.
- defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this ProtectedBranch.
-
branch_name
¶ [Required] Gets the branch_name of this ProtectedBranch. Branch name inside a repository.
Returns: The branch_name of this ProtectedBranch. Return type: str
Gets the defined_tags of this ProtectedBranch. Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {“foo-namespace”: {“bar-key”: “value”}}
Returns: The defined_tags of this ProtectedBranch. Return type: dict(str, dict(str, object))
Gets the freeform_tags of this ProtectedBranch. Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {“bar-key”: “value”}
Returns: The freeform_tags of this ProtectedBranch. Return type: dict(str, str)
-
protection_levels
¶ [Required] Gets the protection_levels of this ProtectedBranch. Protection levels to be added on the branch.
Allowed values for items in this list are: “READ_ONLY”, “PULL_REQUEST_MERGE_ONLY”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
Returns: The protection_levels of this ProtectedBranch. Return type: list[str]
-