Class SecureSourceManagerClient (0.1.16)

SecureSourceManagerClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.securesourcemanager_v1.services.secure_source_manager.transports.base.SecureSourceManagerTransport, typing.Callable[[...], google.cloud.securesourcemanager_v1.services.secure_source_manager.transports.base.SecureSourceManagerTransport]]] = None, client_options: typing.Optional[typing.Union[google.api_core.client_options.ClientOptions, dict]] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)

Secure Source Manager API

Access Secure Source Manager instances, resources, and repositories.

Properties

api_endpoint

Return the API endpoint used by the client instance.

Returns
Type Description
str The API endpoint used by the client instance.

transport

Returns the transport used by the client instance.

Returns
Type Description
SecureSourceManagerTransport The transport used by the client instance.

universe_domain

Return the universe domain used by the client instance.

Returns
Type Description
str The universe domain used by the client instance.

Methods

SecureSourceManagerClient

SecureSourceManagerClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.cloud.securesourcemanager_v1.services.secure_source_manager.transports.base.SecureSourceManagerTransport, typing.Callable[[...], google.cloud.securesourcemanager_v1.services.secure_source_manager.transports.base.SecureSourceManagerTransport]]] = None, client_options: typing.Optional[typing.Union[google.api_core.client_options.ClientOptions, dict]] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)

Instantiates the secure source manager client.

Parameters
Name Description
credentials Optional[google.auth.credentials.Credentials]

The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment.

transport Optional[Union[str,SecureSourceManagerTransport,Callable[..., SecureSourceManagerTransport]]]

The transport to use, or a Callable that constructs and returns a new transport. If a Callable is given, it will be called with the same set of initialization arguments as used in the SecureSourceManagerTransport constructor. If set to None, a transport is chosen automatically.

client_options Optional[Union[google.api_core.client_options.ClientOptions, dict]]

Custom options for the client. 1. The api_endpoint property can be used to override the default endpoint provided by the client when transport is not explicitly provided. Only if this property is not set and transport was not explicitly provided, the endpoint is determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment variable, which have one of the following values: "always" (always use the default mTLS endpoint), "never" (always use the default regular endpoint) and "auto" (auto-switch to the default mTLS endpoint if client certificate is present; this is the default value). 2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is "true", then the client_cert_source property can be used to provide a client certificate for mTLS transport. If not provided, the default SSL client certificate will be used if present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not set, no client certificate will be used. 3. The universe_domain property can be used to override the default "googleapis.com" universe. Note that the api_endpoint property still takes precedence; and universe_domain is currently not supported for mTLS.

client_info google.api_core.gapic_v1.client_info.ClientInfo

The client info used to send a user-agent string along with API requests. If None, then default info will be used. Generally, you only need to set this if you're developing your own client library.

Exceptions
Type Description
google.auth.exceptions.MutualTLSChannelError If mutual TLS transport creation failed for any reason.

__exit__

__exit__(type, value, traceback)

Releases underlying transport's resources.

batch_create_pull_request_comments

batch_create_pull_request_comments(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.BatchCreatePullRequestCommentsRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    requests: typing.Optional[
        typing.MutableSequence[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.CreatePullRequestCommentRequest
        ]
    ] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Batch creates pull request comments.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_batch_create_pull_request_comments():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    requests = securesourcemanager_v1.CreatePullRequestCommentRequest()
    requests.parent = "parent_value"
    requests.pull_request_comment.review.action_type = "APPROVED"

    request = securesourcemanager_v1.BatchCreatePullRequestCommentsRequest(
        parent="parent_value",
        requests=requests,
    )

    # Make the request
    operation = client.batch_create_pull_request_comments(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.BatchCreatePullRequestCommentsRequest, dict]

The request object. The request to batch create pull request comments.

parent str

Required. The pull request in which to create the pull request comments. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id} This corresponds to the parent field on the request instance; if request is provided, this should not be set.

requests MutableSequence[google.cloud.securesourcemanager_v1.types.CreatePullRequestCommentRequest]

Required. The request message specifying the resources to create. There should be exactly one CreatePullRequestCommentRequest with CommentDetail being REVIEW in the list, and no more than 100 CreatePullRequestCommentRequests with CommentDetail being CODE in the list This corresponds to the requests field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be BatchCreatePullRequestCommentsResponse The response to batch create pull request comments.

branch_rule_path

branch_rule_path(
    project: str, location: str, repository: str, branch_rule: str
) -> str

Returns a fully-qualified branch_rule string.

ca_pool_path

ca_pool_path(project: str, location: str, ca_pool: str) -> str

Returns a fully-qualified ca_pool string.

cancel_operation

cancel_operation(
    request: typing.Optional[
        google.longrunning.operations_pb2.CancelOperationRequest
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> None

Starts asynchronous cancellation on a long-running operation.

The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters
Name Description
request .operations_pb2.CancelOperationRequest

The request object. Request message for CancelOperation method.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

close_issue

close_issue(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.CloseIssueRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Closes an issue.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_close_issue():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.CloseIssueRequest(
        name="name_value",
    )

    # Make the request
    operation = client.close_issue(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.CloseIssueRequest, dict]

The request object. The request to close an issue.

name str

Required. Name of the issue to close. The format is projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be Issue Metadata of an Issue.

close_pull_request

close_pull_request(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.ClosePullRequestRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Closes a pull request without merging.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_close_pull_request():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.ClosePullRequestRequest(
        name="name_value",
    )

    # Make the request
    operation = client.close_pull_request(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.ClosePullRequestRequest, dict]

The request object. ClosePullRequestRequest is the request to close a pull request.

name str

Required. The pull request to close. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id} This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be PullRequest Metadata of a PullRequest. PullRequest is the request from a user to merge a branch (head) into another branch (base).

common_billing_account_path

common_billing_account_path(billing_account: str) -> str

Returns a fully-qualified billing_account string.

common_folder_path

common_folder_path(folder: str) -> str

Returns a fully-qualified folder string.

common_location_path

common_location_path(project: str, location: str) -> str

Returns a fully-qualified location string.

common_organization_path

common_organization_path(organization: str) -> str

Returns a fully-qualified organization string.

common_project_path

common_project_path(project: str) -> str

Returns a fully-qualified project string.

create_branch_rule

create_branch_rule(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.CreateBranchRuleRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    branch_rule: typing.Optional[
        google.cloud.securesourcemanager_v1.types.secure_source_manager.BranchRule
    ] = None,
    branch_rule_id: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

CreateBranchRule creates a branch rule in a given repository.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_create_branch_rule():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.CreateBranchRuleRequest(
        parent="parent_value",
        branch_rule_id="branch_rule_id_value",
    )

    # Make the request
    operation = client.create_branch_rule(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.CreateBranchRuleRequest, dict]

The request object. CreateBranchRuleRequest is the request to create a branch rule.

parent str

This corresponds to the parent field on the request instance; if request is provided, this should not be set.

branch_rule google.cloud.securesourcemanager_v1.types.BranchRule

This corresponds to the branch_rule field on the request instance; if request is provided, this should not be set.

branch_rule_id str

This corresponds to the branch_rule_id field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be BranchRule Metadata of a BranchRule. BranchRule is the protection rule to enforce pre-defined rules on designated branches within a repository.

create_hook

create_hook(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.CreateHookRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    hook: typing.Optional[
        google.cloud.securesourcemanager_v1.types.secure_source_manager.Hook
    ] = None,
    hook_id: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Creates a new hook in a given repository.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_create_hook():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    hook = securesourcemanager_v1.Hook()
    hook.target_uri = "target_uri_value"

    request = securesourcemanager_v1.CreateHookRequest(
        parent="parent_value",
        hook=hook,
        hook_id="hook_id_value",
    )

    # Make the request
    operation = client.create_hook(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.CreateHookRequest, dict]

The request object. CreateHookRequest is the request for creating a hook.

parent str

Required. The repository in which to create the hook. Values are of the form projects/{project_number}/locations/{location_id}/repositories/{repository_id} This corresponds to the parent field on the request instance; if request is provided, this should not be set.

hook google.cloud.securesourcemanager_v1.types.Hook

Required. The resource being created. This corresponds to the hook field on the request instance; if request is provided, this should not be set.

hook_id str

Required. The ID to use for the hook, which will become the final component of the hook's resource name. This value restricts to lower-case letters, numbers, and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum. This corresponds to the hook_id field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be Hook Metadata of a Secure Source Manager Hook.

create_instance

create_instance(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.CreateInstanceRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    instance: typing.Optional[
        google.cloud.securesourcemanager_v1.types.secure_source_manager.Instance
    ] = None,
    instance_id: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Creates a new instance in a given project and location.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_create_instance():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.CreateInstanceRequest(
        parent="parent_value",
        instance_id="instance_id_value",
    )

    # Make the request
    operation = client.create_instance(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.CreateInstanceRequest, dict]

The request object. CreateInstanceRequest is the request for creating an instance.

parent str

Required. Value for parent. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

instance google.cloud.securesourcemanager_v1.types.Instance

Required. The resource being created. This corresponds to the instance field on the request instance; if request is provided, this should not be set.

instance_id str

Required. ID of the instance to be created. This corresponds to the instance_id field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be Instance A resource that represents a Secure Source Manager instance.

create_issue

create_issue(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.CreateIssueRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    issue: typing.Optional[
        google.cloud.securesourcemanager_v1.types.secure_source_manager.Issue
    ] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Creates an issue.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_create_issue():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    issue = securesourcemanager_v1.Issue()
    issue.title = "title_value"

    request = securesourcemanager_v1.CreateIssueRequest(
        parent="parent_value",
        issue=issue,
    )

    # Make the request
    operation = client.create_issue(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.CreateIssueRequest, dict]

The request object. The request to create an issue.

parent str

Required. The repository in which to create the issue. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id} This corresponds to the parent field on the request instance; if request is provided, this should not be set.

issue google.cloud.securesourcemanager_v1.types.Issue

Required. The issue to create. This corresponds to the issue field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be Issue Metadata of an Issue.

create_issue_comment

create_issue_comment(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.CreateIssueCommentRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    issue_comment: typing.Optional[
        google.cloud.securesourcemanager_v1.types.secure_source_manager.IssueComment
    ] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Creates an issue comment.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_create_issue_comment():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    issue_comment = securesourcemanager_v1.IssueComment()
    issue_comment.body = "body_value"

    request = securesourcemanager_v1.CreateIssueCommentRequest(
        parent="parent_value",
        issue_comment=issue_comment,
    )

    # Make the request
    operation = client.create_issue_comment(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.CreateIssueCommentRequest, dict]

The request object. The request to create an issue comment.

parent str

Required. The issue in which to create the issue comment. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id} This corresponds to the parent field on the request instance; if request is provided, this should not be set.

issue_comment google.cloud.securesourcemanager_v1.types.IssueComment

Required. The issue comment to create. This corresponds to the issue_comment field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be IssueComment IssueComment represents a comment on an issue.

create_pull_request

create_pull_request(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.CreatePullRequestRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    pull_request: typing.Optional[
        google.cloud.securesourcemanager_v1.types.secure_source_manager.PullRequest
    ] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Creates a pull request.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_create_pull_request():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    pull_request = securesourcemanager_v1.PullRequest()
    pull_request.title = "title_value"
    pull_request.base.ref = "ref_value"

    request = securesourcemanager_v1.CreatePullRequestRequest(
        parent="parent_value",
        pull_request=pull_request,
    )

    # Make the request
    operation = client.create_pull_request(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.CreatePullRequestRequest, dict]

The request object. CreatePullRequestRequest is the request to create a pull request.

parent str

Required. The repository that the pull request is created from. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id} This corresponds to the parent field on the request instance; if request is provided, this should not be set.

pull_request google.cloud.securesourcemanager_v1.types.PullRequest

Required. The pull request to create. This corresponds to the pull_request field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be PullRequest Metadata of a PullRequest. PullRequest is the request from a user to merge a branch (head) into another branch (base).

create_pull_request_comment

create_pull_request_comment(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.CreatePullRequestCommentRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    pull_request_comment: typing.Optional[
        google.cloud.securesourcemanager_v1.types.secure_source_manager.PullRequestComment
    ] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Creates a pull request comment.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_create_pull_request_comment():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    pull_request_comment = securesourcemanager_v1.PullRequestComment()
    pull_request_comment.review.action_type = "APPROVED"

    request = securesourcemanager_v1.CreatePullRequestCommentRequest(
        parent="parent_value",
        pull_request_comment=pull_request_comment,
    )

    # Make the request
    operation = client.create_pull_request_comment(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.CreatePullRequestCommentRequest, dict]

The request object. The request to create a pull request comment.

parent str

Required. The pull request in which to create the pull request comment. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id} This corresponds to the parent field on the request instance; if request is provided, this should not be set.

pull_request_comment google.cloud.securesourcemanager_v1.types.PullRequestComment

Required. The pull request comment to create. This corresponds to the pull_request_comment field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be PullRequestComment PullRequestComment represents a comment on a pull request.

create_repository

create_repository(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.CreateRepositoryRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    repository: typing.Optional[
        google.cloud.securesourcemanager_v1.types.secure_source_manager.Repository
    ] = None,
    repository_id: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Creates a new repository in a given project and location. The Repository.Instance field is required in the request body for requests using the securesourcemanager.googleapis.com endpoint.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_create_repository():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.CreateRepositoryRequest(
        parent="parent_value",
        repository_id="repository_id_value",
    )

    # Make the request
    operation = client.create_repository(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.CreateRepositoryRequest, dict]

The request object. CreateRepositoryRequest is the request for creating a repository.

parent str

Required. The project in which to create the repository. Values are of the form projects/{project_number}/locations/{location_id} This corresponds to the parent field on the request instance; if request is provided, this should not be set.

repository google.cloud.securesourcemanager_v1.types.Repository

Required. The resource being created. This corresponds to the repository field on the request instance; if request is provided, this should not be set.

repository_id str

Required. The ID to use for the repository, which will become the final component of the repository's resource name. This value should be 4-63 characters, and valid characters are /a-z][0-9]-/. This corresponds to the repository_id field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be Repository Metadata of a Secure Source Manager repository.

crypto_key_path

crypto_key_path(project: str, location: str, key_ring: str, crypto_key: str) -> str

Returns a fully-qualified crypto_key string.

delete_branch_rule

delete_branch_rule(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.DeleteBranchRuleRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

DeleteBranchRule deletes a branch rule.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_delete_branch_rule():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.DeleteBranchRuleRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_branch_rule(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.DeleteBranchRuleRequest, dict]

The request object. DeleteBranchRuleRequest is the request to delete a branch rule.

name str

This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }

delete_hook

delete_hook(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.DeleteHookRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Deletes a Hook.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_delete_hook():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.DeleteHookRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_hook(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.DeleteHookRequest, dict]

The request object. DeleteHookRequest is the request to delete a hook.

name str

Required. Name of the hook to delete. The format is projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }

delete_instance

delete_instance(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.DeleteInstanceRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Deletes a single instance.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_delete_instance():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.DeleteInstanceRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_instance(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.DeleteInstanceRequest, dict]

The request object. DeleteInstanceRequest is the request for deleting an instance.

name str

Required. Name of the resource. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }

delete_issue

delete_issue(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.DeleteIssueRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Deletes an issue.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_delete_issue():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.DeleteIssueRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_issue(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.DeleteIssueRequest, dict]

The request object. The request to delete an issue.

name str

Required. Name of the issue to delete. The format is projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }

delete_issue_comment

delete_issue_comment(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.DeleteIssueCommentRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Deletes an issue comment.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_delete_issue_comment():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.DeleteIssueCommentRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_issue_comment(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.DeleteIssueCommentRequest, dict]

The request object. The request to delete an issue comment.

name str

Required. Name of the issue comment to delete. The format is projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}/issueComments/{comment_id}. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }

delete_operation

delete_operation(
    request: typing.Optional[
        google.longrunning.operations_pb2.DeleteOperationRequest
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> None

Deletes a long-running operation.

This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters
Name Description
request .operations_pb2.DeleteOperationRequest

The request object. Request message for DeleteOperation method.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

delete_pull_request_comment

delete_pull_request_comment(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.DeletePullRequestCommentRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Deletes a pull request comment.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_delete_pull_request_comment():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.DeletePullRequestCommentRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_pull_request_comment(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.DeletePullRequestCommentRequest, dict]

The request object. The request to delete a pull request comment. A Review PullRequestComment cannot be deleted.

name str

Required. Name of the pull request comment to delete. The format is projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }

delete_repository

delete_repository(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.DeleteRepositoryRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Deletes a Repository.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_delete_repository():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.DeleteRepositoryRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_repository(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.DeleteRepositoryRequest, dict]

The request object. DeleteRepositoryRequest is the request to delete a repository.

name str

Required. Name of the repository to delete. The format is projects/{project_number}/locations/{location_id}/repositories/{repository_id}. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }

fetch_blob

fetch_blob(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.FetchBlobRequest,
            dict,
        ]
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.securesourcemanager_v1.types.secure_source_manager.FetchBlobResponse

Fetches a blob from a repository.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_fetch_blob():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.FetchBlobRequest(
        repository="repository_value",
        sha="sha_value",
    )

    # Make the request
    response = client.fetch_blob(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.FetchBlobRequest, dict]

The request object. Request message for fetching a blob (file content) from a repository.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.securesourcemanager_v1.types.FetchBlobResponse Response message containing the content of a blob.

fetch_tree

fetch_tree(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.FetchTreeRequest,
            dict,
        ]
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
    google.cloud.securesourcemanager_v1.services.secure_source_manager.pagers.FetchTreePager
)

Fetches a tree from a repository.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_fetch_tree():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.FetchTreeRequest(
        repository="repository_value",
    )

    # Make the request
    page_result = client.fetch_tree(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.FetchTreeRequest, dict]

The request object. Request message for fetching a tree structure from a repository.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.securesourcemanager_v1.services.secure_source_manager.pagers.FetchTreePager Response message containing a list of TreeEntry objects. Iterating over this object will yield results and resolve additional pages automatically.

from_service_account_file

from_service_account_file(filename: str, *args, **kwargs)

Creates an instance of this client using the provided credentials file.

Parameter
Name Description
filename str

The path to the service account private key json file.

Returns
Type Description
SecureSourceManagerClient The constructed client.

from_service_account_info

from_service_account_info(info: dict, *args, **kwargs)

Creates an instance of this client using the provided credentials info.

Parameter
Name Description
info dict

The service account private key info.

Returns
Type Description
SecureSourceManagerClient The constructed client.

from_service_account_json

from_service_account_json(filename: str, *args, **kwargs)

Creates an instance of this client using the provided credentials file.

Parameter
Name Description
filename str

The path to the service account private key json file.

Returns
Type Description
SecureSourceManagerClient The constructed client.

get_branch_rule

get_branch_rule(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.GetBranchRuleRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.securesourcemanager_v1.types.secure_source_manager.BranchRule

GetBranchRule gets a branch rule.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_get_branch_rule():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.GetBranchRuleRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_branch_rule(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.GetBranchRuleRequest, dict]

The request object. GetBranchRuleRequest is the request for getting a branch rule.

name str

Required. Name of the repository to retrieve. The format is projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.securesourcemanager_v1.types.BranchRule Metadata of a BranchRule. BranchRule is the protection rule to enforce pre-defined rules on designated branches within a repository.

get_hook

get_hook(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.GetHookRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.securesourcemanager_v1.types.secure_source_manager.Hook

Gets metadata of a hook.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_get_hook():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.GetHookRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_hook(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.GetHookRequest, dict]

The request object. GetHookRequest is the request for getting a hook.

name str

Required. Name of the hook to retrieve. The format is projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.securesourcemanager_v1.types.Hook Metadata of a Secure Source Manager Hook.

get_iam_policy

get_iam_policy(
    request: typing.Optional[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.iam.v1.policy_pb2.Policy

Gets the IAM access control policy for a function.

Returns an empty policy if the function exists and does not have a policy set.

Parameters
Name Description
request .iam_policy_pb2.GetIamPolicyRequest

The request object. Request message for GetIamPolicy method.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
.policy_pb2.Policy Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A Policy is a collection of bindings. A binding binds one or more members to a single role. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions (defined by IAM or configured by users). A binding can optionally specify a condition, which is a logic expression that further constrains the role binding based on attributes about the request and/or target resource. **JSON Example** :: { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:[email protected]", "group:[email protected]", "domain:google.com", "serviceAccount:[email protected]" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:[email protected]"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01t00:00:00.000z')",="" }="" }="" ]="" }="" **yaml="" example**="" ::="" bindings:="" -="" members:="" -="" user:[email protected]="" -="" group:[email protected]="" -="" domain:google.com="" -="" serviceaccount:[email protected]="" role:="" roles/resourcemanager.organizationadmin="" -="" members:="" -="" user:[email protected]="" role:="" roles/resourcemanager.organizationviewer="" condition:="" title:="" expirable="" access="" description:="" does="" not="" grant="" access="" after="" sep="" 2020="" expression:="" request.time="">< timestamp('2020-10-01t00:00:00.000z')="" for="" a="" description="" of="" iam="" and="" its="" features,="" see="" the="">IAM developer's guide __.

get_iam_policy_repo

get_iam_policy_repo(
    request: typing.Optional[
        typing.Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]
    ] = None,
    *,
    resource: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.iam.v1.policy_pb2.Policy

Get IAM policy for a repository.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1
from google.iam.v1 import iam_policy_pb2  # type: ignore

def sample_get_iam_policy_repo():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = iam_policy_pb2.GetIamPolicyRequest(
        resource="resource_value",
    )

    # Make the request
    response = client.get_iam_policy_repo(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]

The request object. Request message for GetIamPolicy method.

resource str

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. This corresponds to the resource field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.iam.v1.policy_pb2.Policy An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A Policy is a collection of bindings. A binding binds one or more members, or principals, to a single role. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions; each role can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a binding can also specify a condition, which is a logical expression that allows access to a resource only if the expression evaluates to true. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](\ https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** :literal:\ { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:[email protected]", "group:[email protected]", "domain:google.com", "serviceAccount:[email protected]" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:[email protected]" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01t00:00:00.000z')",="" }="" }="" ],="" "etag":="" "bwwwja0yfja=", " version":="" 3="">\ \ **YAML example:** :literal:\ bindings: - members: - user:[email protected] - group:[email protected] - domain:google.com - serviceAccount:[email protected] role: roles/resourcemanager.organizationAdmin - members: - user:[email protected] role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01t00:00:00.000z')="" etag:="" bwwwja0yfja="version:">\ \ For a description of IAM and its features, see the [IAM documentation](\ https://cloud.google.com/iam/docs/).

get_instance

get_instance(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.GetInstanceRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.securesourcemanager_v1.types.secure_source_manager.Instance

Gets details of a single instance.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_get_instance():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.GetInstanceRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_instance(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.GetInstanceRequest, dict]

The request object. GetInstanceRequest is the request for getting an instance.

name str

Required. Name of the resource. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.securesourcemanager_v1.types.Instance A resource that represents a Secure Source Manager instance.

get_issue

get_issue(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.GetIssueRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.securesourcemanager_v1.types.secure_source_manager.Issue

Gets an issue.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_get_issue():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.GetIssueRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_issue(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.GetIssueRequest, dict]

The request object. The request to get an issue.

name str

Required. Name of the issue to retrieve. The format is projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.securesourcemanager_v1.types.Issue Metadata of an Issue.

get_issue_comment

get_issue_comment(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.GetIssueCommentRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.securesourcemanager_v1.types.secure_source_manager.IssueComment

Gets an issue comment.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_get_issue_comment():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.GetIssueCommentRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_issue_comment(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.GetIssueCommentRequest, dict]

The request object. The request to get an issue comment.

name str

Required. Name of the issue comment to retrieve. The format is projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}/issueComments/{comment_id}. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.securesourcemanager_v1.types.IssueComment IssueComment represents a comment on an issue.

get_location

get_location(
    request: typing.Optional[
        google.cloud.location.locations_pb2.GetLocationRequest
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.location.locations_pb2.Location

Gets information about a location.

Parameters
Name Description
request .location_pb2.GetLocationRequest

The request object. Request message for GetLocation method.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
.location_pb2.Location Location object.

get_mtls_endpoint_and_cert_source

get_mtls_endpoint_and_cert_source(
    client_options: typing.Optional[
        google.api_core.client_options.ClientOptions
    ] = None,
)

Deprecated. Return the API endpoint and client cert source for mutual TLS.

The client cert source is determined in the following order: (1) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is not "true", the client cert source is None. (2) if client_options.client_cert_source is provided, use the provided one; if the default client cert source exists, use the default one; otherwise the client cert source is None.

The API endpoint is determined in the following order: (1) if client_options.api_endpoint if provided, use the provided one. (2) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is "always", use the default mTLS endpoint; if the environment variable is "never", use the default API endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise use the default API endpoint.

More details can be found at https://google.aip.dev/auth/4114.

Parameter
Name Description
client_options google.api_core.client_options.ClientOptions

Custom options for the client. Only the api_endpoint and client_cert_source properties may be used in this method.

Exceptions
Type Description
google.auth.exceptions.MutualTLSChannelError If any errors happen.
Returns
Type Description
Tuple[str, Callable[[], Tuple[bytes, bytes]]] returns the API endpoint and the client cert source to use.

get_operation

get_operation(
    request: typing.Optional[
        google.longrunning.operations_pb2.GetOperationRequest
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.longrunning.operations_pb2.Operation

Gets the latest state of a long-running operation.

Parameters
Name Description
request .operations_pb2.GetOperationRequest

The request object. Request message for GetOperation method.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
.operations_pb2.Operation An Operation object.

get_pull_request

get_pull_request(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.GetPullRequestRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.securesourcemanager_v1.types.secure_source_manager.PullRequest

Gets a pull request.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_get_pull_request():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.GetPullRequestRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_pull_request(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.GetPullRequestRequest, dict]

The request object. GetPullRequestRequest is the request to get a pull request.

name str

Required. Name of the pull request to retrieve. The format is projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.securesourcemanager_v1.types.PullRequest Metadata of a PullRequest. PullRequest is the request from a user to merge a branch (head) into another branch (base).

get_pull_request_comment

get_pull_request_comment(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.GetPullRequestCommentRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.securesourcemanager_v1.types.secure_source_manager.PullRequestComment

Gets a pull request comment.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_get_pull_request_comment():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.GetPullRequestCommentRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_pull_request_comment(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.GetPullRequestCommentRequest, dict]

The request object. The request to get a pull request comment.

name str

Required. Name of the pull request comment to retrieve. The format is projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id}. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.securesourcemanager_v1.types.PullRequestComment PullRequestComment represents a comment on a pull request.

get_repository

get_repository(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.GetRepositoryRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.securesourcemanager_v1.types.secure_source_manager.Repository

Gets metadata of a repository.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_get_repository():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.GetRepositoryRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_repository(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.GetRepositoryRequest, dict]

The request object. GetRepositoryRequest is the request for getting a repository.

name str

Required. Name of the repository to retrieve. The format is projects/{project_number}/locations/{location_id}/repositories/{repository_id}. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.securesourcemanager_v1.types.Repository Metadata of a Secure Source Manager repository.

hook_path

hook_path(project: str, location: str, repository: str, hook: str) -> str

Returns a fully-qualified hook string.

instance_path

instance_path(project: str, location: str, instance: str) -> str

Returns a fully-qualified instance string.

issue_comment_path

issue_comment_path(
    project: str, location: str, repository: str, issue: str, comment: str
) -> str

Returns a fully-qualified issue_comment string.

issue_path

issue_path(project: str, location: str, repository: str, issue: str) -> str

Returns a fully-qualified issue string.

list_branch_rules

list_branch_rules(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.ListBranchRulesRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
    google.cloud.securesourcemanager_v1.services.secure_source_manager.pagers.ListBranchRulesPager
)

ListBranchRules lists branch rules in a given repository.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_list_branch_rules():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.ListBranchRulesRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_branch_rules(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.ListBranchRulesRequest, dict]

The request object. ListBranchRulesRequest is the request to list branch rules.

parent str

This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.securesourcemanager_v1.services.secure_source_manager.pagers.ListBranchRulesPager ListBranchRulesResponse is the response to listing branchRules. Iterating over this object will yield results and resolve additional pages automatically.

list_hooks

list_hooks(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.ListHooksRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
    google.cloud.securesourcemanager_v1.services.secure_source_manager.pagers.ListHooksPager
)

Lists hooks in a given repository.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_list_hooks():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.ListHooksRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_hooks(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.ListHooksRequest, dict]

The request object. ListHooksRequest is request to list hooks.

parent str

Required. Parent value for ListHooksRequest. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.securesourcemanager_v1.services.secure_source_manager.pagers.ListHooksPager ListHooksResponse is response to list hooks. Iterating over this object will yield results and resolve additional pages automatically.

list_instances

list_instances(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.ListInstancesRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
    google.cloud.securesourcemanager_v1.services.secure_source_manager.pagers.ListInstancesPager
)

Lists Instances in a given project and location.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_list_instances():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.ListInstancesRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_instances(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.ListInstancesRequest, dict]

The request object. ListInstancesRequest is the request to list instances.

parent str

Required. Parent value for ListInstancesRequest. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.securesourcemanager_v1.services.secure_source_manager.pagers.ListInstancesPager Iterating over this object will yield results and resolve additional pages automatically.

list_issue_comments

list_issue_comments(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.ListIssueCommentsRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
    google.cloud.securesourcemanager_v1.services.secure_source_manager.pagers.ListIssueCommentsPager
)

Lists comments in an issue.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_list_issue_comments():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.ListIssueCommentsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_issue_comments(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.ListIssueCommentsRequest, dict]

The request object. The request to list issue comments.

parent str

Required. The issue in which to list the comments. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id} This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.securesourcemanager_v1.services.secure_source_manager.pagers.ListIssueCommentsPager The response to list issue comments. Iterating over this object will yield results and resolve additional pages automatically.

list_issues

list_issues(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.ListIssuesRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
    google.cloud.securesourcemanager_v1.services.secure_source_manager.pagers.ListIssuesPager
)

Lists issues in a repository.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_list_issues():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.ListIssuesRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_issues(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.ListIssuesRequest, dict]

The request object. The request to list issues.

parent str

Required. The repository in which to list issues. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id} This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.securesourcemanager_v1.services.secure_source_manager.pagers.ListIssuesPager The response to list issues. Iterating over this object will yield results and resolve additional pages automatically.

list_locations

list_locations(
    request: typing.Optional[
        google.cloud.location.locations_pb2.ListLocationsRequest
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.location.locations_pb2.ListLocationsResponse

Lists information about the supported locations for this service.

Parameters
Name Description
request .location_pb2.ListLocationsRequest

The request object. Request message for ListLocations method.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
.location_pb2.ListLocationsResponse Response message for ListLocations method.

list_operations

list_operations(
    request: typing.Optional[
        google.longrunning.operations_pb2.ListOperationsRequest
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.longrunning.operations_pb2.ListOperationsResponse

Lists operations that match the specified filter in the request.

Parameters
Name Description
request .operations_pb2.ListOperationsRequest

The request object. Request message for ListOperations method.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
.operations_pb2.ListOperationsResponse Response message for ListOperations method.

list_pull_request_comments

list_pull_request_comments(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.ListPullRequestCommentsRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
    google.cloud.securesourcemanager_v1.services.secure_source_manager.pagers.ListPullRequestCommentsPager
)

Lists pull request comments.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_list_pull_request_comments():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.ListPullRequestCommentsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_pull_request_comments(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.ListPullRequestCommentsRequest, dict]

The request object. The request to list pull request comments.

parent str

Required. The pull request in which to list pull request comments. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id} This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.securesourcemanager_v1.services.secure_source_manager.pagers.ListPullRequestCommentsPager The response to list pull request comments. Iterating over this object will yield results and resolve additional pages automatically.

list_pull_request_file_diffs

list_pull_request_file_diffs(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.ListPullRequestFileDiffsRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
    google.cloud.securesourcemanager_v1.services.secure_source_manager.pagers.ListPullRequestFileDiffsPager
)

Lists a pull request's file diffs.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_list_pull_request_file_diffs():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.ListPullRequestFileDiffsRequest(
        name="name_value",
    )

    # Make the request
    page_result = client.list_pull_request_file_diffs(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.ListPullRequestFileDiffsRequest, dict]

The request object. ListPullRequestFileDiffsRequest is the request to list pull request file diffs.

name str

Required. The pull request to list file diffs for. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id} This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.securesourcemanager_v1.services.secure_source_manager.pagers.ListPullRequestFileDiffsPager ListPullRequestFileDiffsResponse is the response containing file diffs returned from ListPullRequestFileDiffs. Iterating over this object will yield results and resolve additional pages automatically.

list_pull_requests

list_pull_requests(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.ListPullRequestsRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
    google.cloud.securesourcemanager_v1.services.secure_source_manager.pagers.ListPullRequestsPager
)

Lists pull requests in a repository.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_list_pull_requests():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.ListPullRequestsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_pull_requests(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.ListPullRequestsRequest, dict]

The request object. ListPullRequestsRequest is the request to list pull requests.

parent str

Required. The repository in which to list pull requests. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id} This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.securesourcemanager_v1.services.secure_source_manager.pagers.ListPullRequestsPager ListPullRequestsResponse is the response to list pull requests. Iterating over this object will yield results and resolve additional pages automatically.

list_repositories

list_repositories(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.ListRepositoriesRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
    google.cloud.securesourcemanager_v1.services.secure_source_manager.pagers.ListRepositoriesPager
)

Lists Repositories in a given project and location.

The instance field is required in the query parameter for requests using the securesourcemanager.googleapis.com endpoint.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_list_repositories():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.ListRepositoriesRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_repositories(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.ListRepositoriesRequest, dict]

The request object. ListRepositoriesRequest is request to list repositories.

parent str

Required. Parent value for ListRepositoriesRequest. This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.securesourcemanager_v1.services.secure_source_manager.pagers.ListRepositoriesPager Iterating over this object will yield results and resolve additional pages automatically.

merge_pull_request

merge_pull_request(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.MergePullRequestRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Merges a pull request.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_merge_pull_request():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.MergePullRequestRequest(
        name="name_value",
    )

    # Make the request
    operation = client.merge_pull_request(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.MergePullRequestRequest, dict]

The request object. MergePullRequestRequest is the request to merge a pull request.

name str

Required. The pull request to merge. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id} This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be PullRequest Metadata of a PullRequest. PullRequest is the request from a user to merge a branch (head) into another branch (base).

open_issue

open_issue(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.OpenIssueRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Opens an issue.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_open_issue():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.OpenIssueRequest(
        name="name_value",
    )

    # Make the request
    operation = client.open_issue(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.OpenIssueRequest, dict]

The request object. The request to open an issue.

name str

Required. Name of the issue to open. The format is projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}. This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be Issue Metadata of an Issue.

open_pull_request

open_pull_request(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.OpenPullRequestRequest,
            dict,
        ]
    ] = None,
    *,
    name: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Opens a pull request.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_open_pull_request():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.OpenPullRequestRequest(
        name="name_value",
    )

    # Make the request
    operation = client.open_pull_request(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.OpenPullRequestRequest, dict]

The request object. OpenPullRequestRequest is the request to open a pull request.

name str

Required. The pull request to open. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id} This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be PullRequest Metadata of a PullRequest. PullRequest is the request from a user to merge a branch (head) into another branch (base).

parse_branch_rule_path

parse_branch_rule_path(path: str) -> typing.Dict[str, str]

Parses a branch_rule path into its component segments.

parse_ca_pool_path

parse_ca_pool_path(path: str) -> typing.Dict[str, str]

Parses a ca_pool path into its component segments.

parse_common_billing_account_path

parse_common_billing_account_path(path: str) -> typing.Dict[str, str]

Parse a billing_account path into its component segments.

parse_common_folder_path

parse_common_folder_path(path: str) -> typing.Dict[str, str]

Parse a folder path into its component segments.

parse_common_location_path

parse_common_location_path(path: str) -> typing.Dict[str, str]

Parse a location path into its component segments.

parse_common_organization_path

parse_common_organization_path(path: str) -> typing.Dict[str, str]

Parse a organization path into its component segments.

parse_common_project_path

parse_common_project_path(path: str) -> typing.Dict[str, str]

Parse a project path into its component segments.

parse_crypto_key_path

parse_crypto_key_path(path: str) -> typing.Dict[str, str]

Parses a crypto_key path into its component segments.

parse_hook_path

parse_hook_path(path: str) -> typing.Dict[str, str]

Parses a hook path into its component segments.

parse_instance_path

parse_instance_path(path: str) -> typing.Dict[str, str]

Parses a instance path into its component segments.

parse_issue_comment_path

parse_issue_comment_path(path: str) -> typing.Dict[str, str]

Parses a issue_comment path into its component segments.

parse_issue_path

parse_issue_path(path: str) -> typing.Dict[str, str]

Parses a issue path into its component segments.

parse_pull_request_comment_path

parse_pull_request_comment_path(path: str) -> typing.Dict[str, str]

Parses a pull_request_comment path into its component segments.

parse_pull_request_path

parse_pull_request_path(path: str) -> typing.Dict[str, str]

Parses a pull_request path into its component segments.

parse_repository_path

parse_repository_path(path: str) -> typing.Dict[str, str]

Parses a repository path into its component segments.

parse_service_attachment_path

parse_service_attachment_path(path: str) -> typing.Dict[str, str]

Parses a service_attachment path into its component segments.

pull_request_comment_path

pull_request_comment_path(
    project: str, location: str, repository: str, pull_request: str, comment: str
) -> str

Returns a fully-qualified pull_request_comment string.

pull_request_path

pull_request_path(
    project: str, location: str, repository: str, pull_request: str
) -> str

Returns a fully-qualified pull_request string.

repository_path

repository_path(project: str, location: str, repository: str) -> str

Returns a fully-qualified repository string.

resolve_pull_request_comments

resolve_pull_request_comments(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.ResolvePullRequestCommentsRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    names: typing.Optional[typing.MutableSequence[str]] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Resolves pull request comments.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_resolve_pull_request_comments():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.ResolvePullRequestCommentsRequest(
        parent="parent_value",
        names=['names_value1', 'names_value2'],
    )

    # Make the request
    operation = client.resolve_pull_request_comments(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.ResolvePullRequestCommentsRequest, dict]

The request object. The request to resolve multiple pull request comments.

parent str

Required. The pull request in which to resolve the pull request comments. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id} This corresponds to the parent field on the request instance; if request is provided, this should not be set.

names MutableSequence[str]

Required. The names of the pull request comments to resolve. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id} Only comments from the same threads are allowed in the same request. This corresponds to the names field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be ResolvePullRequestCommentsResponse The response to resolve multiple pull request comments.

service_attachment_path

service_attachment_path(project: str, region: str, service_attachment: str) -> str

Returns a fully-qualified service_attachment string.

set_iam_policy

set_iam_policy(
    request: typing.Optional[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.iam.v1.policy_pb2.Policy

Sets the IAM access control policy on the specified function.

Replaces any existing policy.

Parameters
Name Description
request .iam_policy_pb2.SetIamPolicyRequest

The request object. Request message for SetIamPolicy method.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
.policy_pb2.Policy Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A Policy is a collection of bindings. A binding binds one or more members to a single role. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions (defined by IAM or configured by users). A binding can optionally specify a condition, which is a logic expression that further constrains the role binding based on attributes about the request and/or target resource. **JSON Example** :: { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:[email protected]", "group:[email protected]", "domain:google.com", "serviceAccount:[email protected]" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:[email protected]"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01t00:00:00.000z')",="" }="" }="" ]="" }="" **yaml="" example**="" ::="" bindings:="" -="" members:="" -="" user:[email protected]="" -="" group:[email protected]="" -="" domain:google.com="" -="" serviceaccount:[email protected]="" role:="" roles/resourcemanager.organizationadmin="" -="" members:="" -="" user:[email protected]="" role:="" roles/resourcemanager.organizationviewer="" condition:="" title:="" expirable="" access="" description:="" does="" not="" grant="" access="" after="" sep="" 2020="" expression:="" request.time="">< timestamp('2020-10-01t00:00:00.000z')="" for="" a="" description="" of="" iam="" and="" its="" features,="" see="" the="">IAM developer's guide __.

set_iam_policy_repo

set_iam_policy_repo(
    request: typing.Optional[
        typing.Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]
    ] = None,
    *,
    resource: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.iam.v1.policy_pb2.Policy

Set IAM policy on a repository.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1
from google.iam.v1 import iam_policy_pb2  # type: ignore

def sample_set_iam_policy_repo():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = iam_policy_pb2.SetIamPolicyRequest(
        resource="resource_value",
    )

    # Make the request
    response = client.set_iam_policy_repo(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]

The request object. Request message for SetIamPolicy method.

resource str

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. This corresponds to the resource field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.iam.v1.policy_pb2.Policy An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A Policy is a collection of bindings. A binding binds one or more members, or principals, to a single role. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions; each role can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a binding can also specify a condition, which is a logical expression that allows access to a resource only if the expression evaluates to true. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](\ https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** :literal:\ { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:[email protected]", "group:[email protected]", "domain:google.com", "serviceAccount:[email protected]" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:[email protected]" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01t00:00:00.000z')",="" }="" }="" ],="" "etag":="" "bwwwja0yfja=", " version":="" 3="">\ \ **YAML example:** :literal:\ bindings: - members: - user:[email protected] - group:[email protected] - domain:google.com - serviceAccount:[email protected] role: roles/resourcemanager.organizationAdmin - members: - user:[email protected] role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01t00:00:00.000z')="" etag:="" bwwwja0yfja="version:">\ \ For a description of IAM and its features, see the [IAM documentation](\ https://cloud.google.com/iam/docs/).

test_iam_permissions

test_iam_permissions(
    request: typing.Optional[
        google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest
    ] = None,
    *,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse

Tests the specified IAM permissions against the IAM access control policy for a function.

If the function does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Parameters
Name Description
request .iam_policy_pb2.TestIamPermissionsRequest

The request object. Request message for TestIamPermissions method.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
.iam_policy_pb2.TestIamPermissionsResponse Response message for TestIamPermissions method.

test_iam_permissions_repo

test_iam_permissions_repo(
    request: typing.Optional[
        typing.Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]
    ] = None,
    *,
    resource: typing.Optional[str] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse

Test IAM permissions on a repository. IAM permission checks are not required on this method.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1
from google.iam.v1 import iam_policy_pb2  # type: ignore

def sample_test_iam_permissions_repo():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = iam_policy_pb2.TestIamPermissionsRequest(
        resource="resource_value",
        permissions=['permissions_value1', 'permissions_value2'],
    )

    # Make the request
    response = client.test_iam_permissions_repo(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]

The request object. Request message for TestIamPermissions method.

resource str

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. This corresponds to the resource field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse Response message for TestIamPermissions method.

unresolve_pull_request_comments

unresolve_pull_request_comments(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.UnresolvePullRequestCommentsRequest,
            dict,
        ]
    ] = None,
    *,
    parent: typing.Optional[str] = None,
    names: typing.Optional[typing.MutableSequence[str]] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Unresolves pull request comment.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_unresolve_pull_request_comments():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.UnresolvePullRequestCommentsRequest(
        parent="parent_value",
        names=['names_value1', 'names_value2'],
    )

    # Make the request
    operation = client.unresolve_pull_request_comments(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.UnresolvePullRequestCommentsRequest, dict]

The request object. The request to unresolve multiple pull request comments.

parent str

Required. The pull request in which to resolve the pull request comments. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id} This corresponds to the parent field on the request instance; if request is provided, this should not be set.

names MutableSequence[str]

Required. The names of the pull request comments to unresolve. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}/pullRequestComments/{comment_id} Only comments from the same threads are allowed in the same request. This corresponds to the names field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be UnresolvePullRequestCommentsResponse The response to unresolve multiple pull request comments.

update_branch_rule

update_branch_rule(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.UpdateBranchRuleRequest,
            dict,
        ]
    ] = None,
    *,
    branch_rule: typing.Optional[
        google.cloud.securesourcemanager_v1.types.secure_source_manager.BranchRule
    ] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

UpdateBranchRule updates a branch rule.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_update_branch_rule():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.UpdateBranchRuleRequest(
    )

    # Make the request
    operation = client.update_branch_rule(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.UpdateBranchRuleRequest, dict]

The request object. UpdateBranchRuleRequest is the request to update a branchRule.

branch_rule google.cloud.securesourcemanager_v1.types.BranchRule

This corresponds to the branch_rule field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Required. Field mask is used to specify the fields to be overwritten in the branchRule resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. The special value "*" means full replacement. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be BranchRule Metadata of a BranchRule. BranchRule is the protection rule to enforce pre-defined rules on designated branches within a repository.

update_hook

update_hook(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.UpdateHookRequest,
            dict,
        ]
    ] = None,
    *,
    hook: typing.Optional[
        google.cloud.securesourcemanager_v1.types.secure_source_manager.Hook
    ] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Updates the metadata of a hook.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_update_hook():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    hook = securesourcemanager_v1.Hook()
    hook.target_uri = "target_uri_value"

    request = securesourcemanager_v1.UpdateHookRequest(
        hook=hook,
    )

    # Make the request
    operation = client.update_hook(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.UpdateHookRequest, dict]

The request object. UpdateHookRequest is the request to update a hook.

hook google.cloud.securesourcemanager_v1.types.Hook

Required. The hook being updated. This corresponds to the hook field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Required. Field mask is used to specify the fields to be overwritten in the hook resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. The special value "*" means full replacement. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be Hook Metadata of a Secure Source Manager Hook.

update_issue

update_issue(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.UpdateIssueRequest,
            dict,
        ]
    ] = None,
    *,
    issue: typing.Optional[
        google.cloud.securesourcemanager_v1.types.secure_source_manager.Issue
    ] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Updates a issue.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_update_issue():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    issue = securesourcemanager_v1.Issue()
    issue.title = "title_value"

    request = securesourcemanager_v1.UpdateIssueRequest(
        issue=issue,
    )

    # Make the request
    operation = client.update_issue(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.UpdateIssueRequest, dict]

The request object. The request to update an issue.

issue google.cloud.securesourcemanager_v1.types.Issue

Required. The issue to update. This corresponds to the issue field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Optional. Field mask is used to specify the fields to be overwritten in the issue resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. The special value "*" means full replacement. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be Issue Metadata of an Issue.

update_issue_comment

update_issue_comment(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.UpdateIssueCommentRequest,
            dict,
        ]
    ] = None,
    *,
    issue_comment: typing.Optional[
        google.cloud.securesourcemanager_v1.types.secure_source_manager.IssueComment
    ] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Updates an issue comment.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_update_issue_comment():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    issue_comment = securesourcemanager_v1.IssueComment()
    issue_comment.body = "body_value"

    request = securesourcemanager_v1.UpdateIssueCommentRequest(
        issue_comment=issue_comment,
    )

    # Make the request
    operation = client.update_issue_comment(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.UpdateIssueCommentRequest, dict]

The request object. The request to update an issue comment.

issue_comment google.cloud.securesourcemanager_v1.types.IssueComment

Required. The issue comment to update. This corresponds to the issue_comment field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Optional. Field mask is used to specify the fields to be overwritten in the issue comment resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. The special value "*" means full replacement. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be IssueComment IssueComment represents a comment on an issue.

update_pull_request

update_pull_request(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.UpdatePullRequestRequest,
            dict,
        ]
    ] = None,
    *,
    pull_request: typing.Optional[
        google.cloud.securesourcemanager_v1.types.secure_source_manager.PullRequest
    ] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Updates a pull request.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_update_pull_request():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    pull_request = securesourcemanager_v1.PullRequest()
    pull_request.title = "title_value"
    pull_request.base.ref = "ref_value"

    request = securesourcemanager_v1.UpdatePullRequestRequest(
        pull_request=pull_request,
    )

    # Make the request
    operation = client.update_pull_request(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.UpdatePullRequestRequest, dict]

The request object. UpdatePullRequestRequest is the request to update a pull request.

pull_request google.cloud.securesourcemanager_v1.types.PullRequest

Required. The pull request to update. This corresponds to the pull_request field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Optional. Field mask is used to specify the fields to be overwritten in the pull request resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. The special value "*" means full replacement. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be PullRequest Metadata of a PullRequest. PullRequest is the request from a user to merge a branch (head) into another branch (base).

update_pull_request_comment

update_pull_request_comment(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.UpdatePullRequestCommentRequest,
            dict,
        ]
    ] = None,
    *,
    pull_request_comment: typing.Optional[
        google.cloud.securesourcemanager_v1.types.secure_source_manager.PullRequestComment
    ] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Updates a pull request comment.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_update_pull_request_comment():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    pull_request_comment = securesourcemanager_v1.PullRequestComment()
    pull_request_comment.review.action_type = "APPROVED"

    request = securesourcemanager_v1.UpdatePullRequestCommentRequest(
        pull_request_comment=pull_request_comment,
    )

    # Make the request
    operation = client.update_pull_request_comment(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.UpdatePullRequestCommentRequest, dict]

The request object. The request to update a pull request comment.

pull_request_comment google.cloud.securesourcemanager_v1.types.PullRequestComment

Required. The pull request comment to update. This corresponds to the pull_request_comment field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Optional. Field mask is used to specify the fields to be overwritten in the pull request comment resource by the update. Updatable fields are body. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be PullRequestComment PullRequestComment represents a comment on a pull request.

update_repository

update_repository(
    request: typing.Optional[
        typing.Union[
            google.cloud.securesourcemanager_v1.types.secure_source_manager.UpdateRepositoryRequest,
            dict,
        ]
    ] = None,
    *,
    repository: typing.Optional[
        google.cloud.securesourcemanager_v1.types.secure_source_manager.Repository
    ] = None,
    update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
    retry: typing.Optional[
        typing.Union[
            google.api_core.retry.retry_unary.Retry,
            google.api_core.gapic_v1.method._MethodDefault,
        ]
    ] = _MethodDefault._DEFAULT_VALUE,
    timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
    metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation.Operation

Updates the metadata of a repository.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import securesourcemanager_v1

def sample_update_repository():
    # Create a client
    client = securesourcemanager_v1.SecureSourceManagerClient()

    # Initialize request argument(s)
    request = securesourcemanager_v1.UpdateRepositoryRequest(
    )

    # Make the request
    operation = client.update_repository(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.securesourcemanager_v1.types.UpdateRepositoryRequest, dict]

The request object. UpdateRepositoryRequest is the request to update a repository.

repository google.cloud.securesourcemanager_v1.types.Repository

Required. The repository being updated. This corresponds to the repository field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Optional. Field mask is used to specify the fields to be overwritten in the repository resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

Designation of what errors, if any, should be retried.

timeout float

The timeout for this request.

metadata Sequence[Tuple[str, Union[str, bytes]]]

Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.api_core.operation.Operation An object representing a long-running operation. The result type for the operation will be Repository Metadata of a Secure Source Manager repository.