ProtectedBranchSummary

class oci.devops.models.ProtectedBranchSummary(**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 ProtectedBranchSummary.
PROTECTION_LEVELS_READ_ONLY A constant which can be used with the protection_levels property of a ProtectedBranchSummary.
branch_name [Required] Gets the branch_name of this ProtectedBranchSummary.
defined_tags Gets the defined_tags of this ProtectedBranchSummary.
freeform_tags Gets the freeform_tags of this ProtectedBranchSummary.
protection_levels [Required] Gets the protection_levels of this ProtectedBranchSummary.
system_tags Gets the system_tags of this ProtectedBranchSummary.

Methods

__init__(**kwargs) Initializes a new ProtectedBranchSummary 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 ProtectedBranchSummary. 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 ProtectedBranchSummary. This constant has a value of “READ_ONLY”

__init__(**kwargs)

Initializes a new ProtectedBranchSummary 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 ProtectedBranchSummary.
  • protection_levels (list[str]) – The value to assign to the protection_levels property of this ProtectedBranchSummary. 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 ProtectedBranchSummary.
  • defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this ProtectedBranchSummary.
  • system_tags (dict(str, dict(str, object))) – The value to assign to the system_tags property of this ProtectedBranchSummary.
branch_name

[Required] Gets the branch_name of this ProtectedBranchSummary. Branch name inside a repository.

Returns:The branch_name of this ProtectedBranchSummary.
Return type:str
defined_tags

Gets the defined_tags of this ProtectedBranchSummary. 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 ProtectedBranchSummary.
Return type:dict(str, dict(str, object))
freeform_tags

Gets the freeform_tags of this ProtectedBranchSummary. 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 ProtectedBranchSummary.
Return type:dict(str, str)
protection_levels

[Required] Gets the protection_levels of this ProtectedBranchSummary. Protection level 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 ProtectedBranchSummary.
Return type:list[str]
system_tags

Gets the system_tags of this ProtectedBranchSummary. Usage of system tag keys. These predefined keys are scoped to namespaces. See Resource Tags. Example: {“orcl-cloud”: {“free-tier-retained”: “true”}}

Returns:The system_tags of this ProtectedBranchSummary.
Return type:dict(str, dict(str, object))