From 674a492fca91c97198a6d9fc6a098388249fab4d Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 26 Mar 2026 23:07:44 +0000 Subject: [PATCH 1/2] feat: Add CustomHostConfig to configure custom hostnames for private instances feat: Add option to require code owner approval in branch rules feat: Add force option to DeleteInstance request docs: Improve documentation for labels, pagination, and ListLocations PiperOrigin-RevId: 889991858 Source-Link: https://github.com/googleapis/googleapis/commit/10ac207779ca2a9de2d3a7ed4183f980619e05b1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/26a9c81372b50cc5009f125175c3c4e43bba8f97 Copy-Tag: eyJwIjoiU2VjdXJlU291cmNlTWFuYWdlci8uT3dsQm90LnlhbWwiLCJoIjoiMjZhOWM4MTM3MmI1MGNjNTAwOWYxMjUxNzVjM2M0ZTQzYmJhOGY5NyJ9 --- .../V1/SecureSourceManager.php | 35 + .../BatchCreatePullRequestCommentsRequest.php | 142 + ...BatchCreatePullRequestCommentsResponse.php | 67 + .../SecureSourceManager/V1/BranchRule.php | 658 ++ .../V1/BranchRule/Check.php | 67 + .../V1/CloseIssueRequest.php | 133 + .../V1/ClosePullRequestRequest.php | 91 + .../V1/CreateBranchRuleRequest.php | 141 + .../V1/CreateHookRequest.php | 188 + .../V1/CreateInstanceRequest.php | 237 + .../V1/CreateIssueCommentRequest.php | 132 + .../V1/CreateIssueRequest.php | 132 + .../V1/CreatePullRequestCommentRequest.php | 137 + .../V1/CreatePullRequestRequest.php | 132 + .../V1/CreateRepositoryRequest.php | 178 + .../V1/DeleteBranchRuleRequest.php | 111 + .../V1/DeleteHookRequest.php | 91 + .../V1/DeleteInstanceRequest.php | 189 + .../V1/DeleteIssueCommentRequest.php | 91 + .../V1/DeleteIssueRequest.php | 133 + .../V1/DeletePullRequestCommentRequest.php | 92 + .../V1/DeleteRepositoryRequest.php | 129 + .../V1/FetchBlobRequest.php | 109 + .../V1/FetchBlobResponse.php | 101 + .../V1/FetchTreeRequest.php | 223 + .../V1/FetchTreeResponse.php | 101 + .../Cloud/SecureSourceManager/V1/FileDiff.php | 170 + .../V1/FileDiff/Action.php | 68 + .../V1/GetBranchRuleRequest.php | 91 + .../SecureSourceManager/V1/GetHookRequest.php | 91 + .../V1/GetInstanceRequest.php | 81 + .../V1/GetIssueCommentRequest.php | 91 + .../V1/GetIssueRequest.php | 91 + .../V1/GetPullRequestCommentRequest.php | 91 + .../V1/GetPullRequestRequest.php | 91 + .../V1/GetRepositoryRequest.php | 91 + .../Cloud/SecureSourceManager/V1/Hook.php | 381 ++ .../V1/Hook/HookEventType.php | 60 + .../V1/Hook/PushOption.php | 77 + .../Cloud/SecureSourceManager/V1/Instance.php | 483 ++ .../V1/Instance/HostConfig.php | 169 + .../V1/Instance/PrivateConfig.php | 267 + .../PrivateConfig/CustomHostConfig.php | 185 + .../SecureSourceManager/V1/Instance/State.php | 82 + .../V1/Instance/StateNote.php | 62 + .../WorkforceIdentityFederationConfig.php | 68 + .../Cloud/SecureSourceManager/V1/Issue.php | 351 + .../SecureSourceManager/V1/Issue/State.php | 61 + .../SecureSourceManager/V1/IssueComment.php | 197 + .../V1/ListBranchRulesRequest.php | 145 + .../V1/ListBranchRulesResponse.php | 101 + .../V1/ListHooksRequest.php | 153 + .../V1/ListHooksResponse.php | 101 + .../V1/ListInstancesRequest.php | 221 + .../V1/ListInstancesResponse.php | 133 + .../V1/ListIssueCommentsRequest.php | 158 + .../V1/ListIssueCommentsResponse.php | 101 + .../V1/ListIssuesRequest.php | 192 + .../V1/ListIssuesResponse.php | 101 + .../V1/ListPullRequestCommentsRequest.php | 158 + .../V1/ListPullRequestCommentsResponse.php | 105 + .../V1/ListPullRequestFileDiffsRequest.php | 164 + .../V1/ListPullRequestFileDiffsResponse.php | 102 + .../V1/ListPullRequestsRequest.php | 158 + .../V1/ListPullRequestsResponse.php | 101 + .../V1/ListRepositoriesRequest.php | 241 + .../V1/ListRepositoriesResponse.php | 99 + .../V1/MergePullRequestRequest.php | 91 + .../V1/OpenIssueRequest.php | 133 + .../V1/OpenPullRequestRequest.php | 91 + .../V1/OperationMetadata.php | 307 + .../SecureSourceManager/V1/PullRequest.php | 406 ++ .../V1/PullRequest/Branch.php | 101 + .../V1/PullRequest/State.php | 68 + .../V1/PullRequestComment.php | 271 + .../V1/PullRequestComment/Code.php | 255 + .../V1/PullRequestComment/Comment.php | 67 + .../V1/PullRequestComment/Position.php | 105 + .../V1/PullRequestComment/Review.php | 135 + .../PullRequestComment/Review/ActionType.php | 68 + .../SecureSourceManager/V1/Repository.php | 419 ++ .../V1/Repository/InitialConfig.php | 665 ++ .../V1/Repository/URIs.php | 139 + .../V1/ResolvePullRequestCommentsRequest.php | 180 + .../V1/ResolvePullRequestCommentsResponse.php | 67 + .../SecureSourceManager/V1/TreeEntry.php | 211 + .../V1/TreeEntry/ObjectType.php | 68 + .../UnresolvePullRequestCommentsRequest.php | 180 + .../UnresolvePullRequestCommentsResponse.php | 67 + .../V1/UpdateBranchRuleRequest.php | 187 + .../V1/UpdateHookRequest.php | 156 + .../V1/UpdateIssueCommentRequest.php | 156 + .../V1/UpdateIssueRequest.php | 156 + .../V1/UpdatePullRequestCommentRequest.php | 146 + .../V1/UpdatePullRequestRequest.php | 156 + .../V1/UpdateRepositoryRequest.php | 194 + .../batch_create_pull_request_comments.php | 114 + .../SecureSourceManagerClient/close_issue.php | 90 + .../close_pull_request.php | 90 + .../create_branch_rule.php | 91 + .../SecureSourceManagerClient/create_hook.php | 100 + .../create_instance.php | 88 + .../create_issue.php | 93 + .../create_issue_comment.php | 94 + .../create_pull_request.php | 102 + .../create_pull_request_comment.php | 96 + .../create_repository.php | 94 + .../delete_branch_rule.php | 84 + .../SecureSourceManagerClient/delete_hook.php | 87 + .../delete_instance.php | 80 + .../delete_issue.php | 87 + .../delete_issue_comment.php | 88 + .../delete_pull_request_comment.php | 88 + .../delete_repository.php | 86 + .../SecureSourceManagerClient/fetch_blob.php | 80 + .../SecureSourceManagerClient/fetch_tree.php | 82 + .../get_branch_rule.php | 78 + .../V1/SecureSourceManagerClient/get_hook.php | 78 + .../get_iam_policy.php | 72 + .../get_iam_policy_repo.php | 71 + .../get_instance.php | 71 + .../SecureSourceManagerClient/get_issue.php | 78 + .../get_issue_comment.php | 79 + .../get_location.php | 57 + .../get_pull_request.php | 78 + .../get_pull_request_comment.php | 79 + .../get_repository.php | 77 + .../list_branch_rules.php | 79 + .../SecureSourceManagerClient/list_hooks.php | 80 + .../list_instances.php | 76 + .../list_issue_comments.php | 82 + .../SecureSourceManagerClient/list_issues.php | 81 + .../list_locations.php | 78 + .../list_pull_request_comments.php | 82 + .../list_pull_request_file_diffs.php | 83 + .../list_pull_requests.php | 81 + .../list_repositories.php | 79 + .../merge_pull_request.php | 90 + .../SecureSourceManagerClient/open_issue.php | 90 + .../open_pull_request.php | 90 + .../resolve_pull_request_comments.php | 108 + .../set_iam_policy.php | 77 + .../set_iam_policy_repo.php | 73 + .../test_iam_permissions.php | 84 + .../test_iam_permissions_repo.php | 79 + .../unresolve_pull_request_comments.php | 108 + .../update_branch_rule.php | 71 + .../SecureSourceManagerClient/update_hook.php | 84 + .../update_issue.php | 84 + .../update_issue_comment.php | 84 + .../update_pull_request.php | 90 + .../update_pull_request_comment.php | 71 + .../update_repository.php | 71 + .../V1/Client/SecureSourceManagerClient.php | 2192 ++++++ .../v1/src/V1/gapic_metadata.json | 303 + .../secure_source_manager_client_config.json | 319 + ...ecure_source_manager_descriptor_config.php | 1036 +++ ...cure_source_manager_rest_client_config.php | 753 ++ .../Client/SecureSourceManagerClientTest.php | 6050 +++++++++++++++++ 159 files changed, 30458 insertions(+) create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/GPBMetadata/Google/Cloud/Securesourcemanager/V1/SecureSourceManager.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BatchCreatePullRequestCommentsRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BatchCreatePullRequestCommentsResponse.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BranchRule.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BranchRule/Check.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CloseIssueRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ClosePullRequestRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateBranchRuleRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateHookRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateInstanceRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateIssueCommentRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateIssueRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreatePullRequestCommentRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreatePullRequestRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateRepositoryRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteBranchRuleRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteHookRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteInstanceRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteIssueCommentRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteIssueRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeletePullRequestCommentRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteRepositoryRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchBlobRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchBlobResponse.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchTreeRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchTreeResponse.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FileDiff.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FileDiff/Action.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetBranchRuleRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetHookRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetInstanceRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetIssueCommentRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetIssueRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetPullRequestCommentRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetPullRequestRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetRepositoryRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Hook.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Hook/HookEventType.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Hook/PushOption.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/HostConfig.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/PrivateConfig.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/PrivateConfig/CustomHostConfig.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/State.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/StateNote.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/WorkforceIdentityFederationConfig.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Issue.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Issue/State.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/IssueComment.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListBranchRulesRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListBranchRulesResponse.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListHooksRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListHooksResponse.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListInstancesRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListInstancesResponse.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssueCommentsRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssueCommentsResponse.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssuesRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssuesResponse.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestCommentsRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestCommentsResponse.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestFileDiffsRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestFileDiffsResponse.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestsRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestsResponse.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListRepositoriesRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListRepositoriesResponse.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/MergePullRequestRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/OpenIssueRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/OpenPullRequestRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/OperationMetadata.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequest/Branch.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequest/State.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Code.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Comment.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Position.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Review.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Review/ActionType.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Repository.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Repository/InitialConfig.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Repository/URIs.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ResolvePullRequestCommentsRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ResolvePullRequestCommentsResponse.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/TreeEntry.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/TreeEntry/ObjectType.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UnresolvePullRequestCommentsRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UnresolvePullRequestCommentsResponse.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateBranchRuleRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateHookRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateIssueCommentRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateIssueRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdatePullRequestCommentRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdatePullRequestRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateRepositoryRequest.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/batch_create_pull_request_comments.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/close_issue.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/close_pull_request.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_branch_rule.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_hook.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_instance.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_issue.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_issue_comment.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_pull_request.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_pull_request_comment.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_repository.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_branch_rule.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_hook.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_instance.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_issue.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_issue_comment.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_pull_request_comment.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_repository.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/fetch_blob.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/fetch_tree.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_branch_rule.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_hook.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_iam_policy.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_iam_policy_repo.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_instance.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_issue.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_issue_comment.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_location.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_pull_request.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_pull_request_comment.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_repository.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_branch_rules.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_hooks.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_instances.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_issue_comments.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_issues.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_locations.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_pull_request_comments.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_pull_request_file_diffs.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_pull_requests.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_repositories.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/merge_pull_request.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/open_issue.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/open_pull_request.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/resolve_pull_request_comments.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/set_iam_policy.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/set_iam_policy_repo.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/test_iam_permissions.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/test_iam_permissions_repo.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/unresolve_pull_request_comments.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_branch_rule.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_hook.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_issue.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_issue_comment.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_pull_request.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_pull_request_comment.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_repository.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/src/V1/Client/SecureSourceManagerClient.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/SecureSourceManager/v1/src/V1/resources/secure_source_manager_client_config.json create mode 100644 owl-bot-staging/SecureSourceManager/v1/src/V1/resources/secure_source_manager_descriptor_config.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/src/V1/resources/secure_source_manager_rest_client_config.php create mode 100644 owl-bot-staging/SecureSourceManager/v1/tests/Unit/V1/Client/SecureSourceManagerClientTest.php diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/GPBMetadata/Google/Cloud/Securesourcemanager/V1/SecureSourceManager.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/GPBMetadata/Google/Cloud/Securesourcemanager/V1/SecureSourceManager.php new file mode 100644 index 000000000000..54a81fb3bfcc --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/GPBMetadata/Google/Cloud/Securesourcemanager/V1/SecureSourceManager.php @@ -0,0 +1,35 @@ +internalAddGeneratedFile( + "\x0A\xE4\xEC\x01\x0A?google/cloud/securesourcemanager/v1/secure_source_manager.proto\x12#google.cloud.securesourcemanager.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x1Bgoogle/api/field_info.proto\x1A\x19google/api/resource.proto\x1A\x1Egoogle/iam/v1/iam_policy.proto\x1A\x1Agoogle/iam/v1/policy.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xED\x0D\x0A\x08Instance\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12N\x0A\x06labels\x18\x04 \x03(\x0B29.google.cloud.securesourcemanager.v1.Instance.LabelsEntryB\x03\xE0A\x01\x12X\x0A\x0Eprivate_config\x18\x0D \x01(\x0B2;.google.cloud.securesourcemanager.v1.Instance.PrivateConfigB\x03\xE0A\x01\x12G\x0A\x05state\x18\x05 \x01(\x0E23.google.cloud.securesourcemanager.v1.Instance.StateB\x03\xE0A\x03\x12P\x0A\x0Astate_note\x18\x0A \x01(\x0E27.google.cloud.securesourcemanager.v1.Instance.StateNoteB\x03\xE0A\x03\x12:\x0A\x07kms_key\x18\x0B \x01(\x09B)\xE0A\x05\xFAA#\x0A!cloudkms.googleapis.com/CryptoKey\x12R\x0A\x0Bhost_config\x18\x09 \x01(\x0B28.google.cloud.securesourcemanager.v1.Instance.HostConfigB\x03\xE0A\x03\x12\x82\x01\x0A\$workforce_identity_federation_config\x18\x0E \x01(\x0B2O.google.cloud.securesourcemanager.v1.Instance.WorkforceIdentityFederationConfigB\x03\xE0A\x01\x1A^\x0A\x0AHostConfig\x12\x11\x0A\x04html\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x10\x0A\x03api\x18\x02 \x01(\x09B\x03\xE0A\x03\x12\x15\x0A\x08git_http\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x14\x0A\x07git_ssh\x18\x04 \x01(\x09B\x03\xE0A\x03\x1A\x85\x04\x0A\x0DPrivateConfig\x12\x1A\x0A\x0Ais_private\x18\x01 \x01(\x08B\x06\xE0A\x05\xE0A\x02\x12;\x0A\x07ca_pool\x18\x02 \x01(\x09B*\xE0A\x05\xE0A\x01\xFAA!\x0A\x1Fprivateca.googleapis.com/CaPool\x12Q\x0A\x17http_service_attachment\x18\x03 \x01(\x09B0\xE0A\x03\xFAA*\x0A(compute.googleapis.com/ServiceAttachment\x12P\x0A\x16ssh_service_attachment\x18\x04 \x01(\x09B0\xE0A\x03\xFAA*\x0A(compute.googleapis.com/ServiceAttachment\x12!\x0A\x14psc_allowed_projects\x18\x06 \x03(\x09B\x03\xE0A\x01\x12m\x0A\x12custom_host_config\x18\x07 \x01(\x0B2L.google.cloud.securesourcemanager.v1.Instance.PrivateConfig.CustomHostConfigB\x03\xE0A\x01\x1Ad\x0A\x10CustomHostConfig\x12\x11\x0A\x04html\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x10\x0A\x03api\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\x14\x0A\x07git_ssh\x18\x03 \x01(\x09B\x03\xE0A\x02\x12\x15\x0A\x08git_http\x18\x04 \x01(\x09B\x03\xE0A\x02\x1A<\x0A!WorkforceIdentityFederationConfig\x12\x17\x0A\x07enabled\x18\x01 \x01(\x08B\x06\xE0A\x05\xE0A\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"_\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02\x12\x0C\x0A\x08DELETING\x10\x03\x12\x0A\x0A\x06PAUSED\x10\x04\x12\x0B\x0A\x07UNKNOWN\x10\x06\"_\x0A\x09StateNote\x12\x1A\x0A\x16STATE_NOTE_UNSPECIFIED\x10\x00\x12\x1B\x0A\x17PAUSED_CMEK_UNAVAILABLE\x10\x01\x12\x19\x0A\x11INSTANCE_RESUMING\x10\x02\x1A\x02\x08\x01:q\xEAAn\x0A+securesourcemanager.googleapis.com/Instance\x12.google.cloud.securesourcemanager.v1.PullRequestComment.ReviewB\x03\xE0A\x01H\x00\x12W\x0A\x07comment\x18\x05 \x01(\x0B2?.google.cloud.securesourcemanager.v1.PullRequestComment.CommentB\x03\xE0A\x01H\x00\x12Q\x0A\x04code\x18\x06 \x01(\x0B2<.google.cloud.securesourcemanager.v1.PullRequestComment.CodeB\x03\xE0A\x01H\x00\x1A\xFF\x01\x0A\x06Review\x12c\x0A\x0Baction_type\x18\x01 \x01(\x0E2I.google.cloud.securesourcemanager.v1.PullRequestComment.Review.ActionTypeB\x03\xE0A\x02\x12\x11\x0A\x04body\x18\x02 \x01(\x09B\x03\xE0A\x01\x12!\x0A\x14effective_commit_sha\x18\x04 \x01(\x09B\x03\xE0A\x03\"Z\x0A\x0AActionType\x12\x1B\x0A\x17ACTION_TYPE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07COMMENT\x10\x01\x12\x14\x0A\x10CHANGE_REQUESTED\x10\x02\x12\x0C\x0A\x08APPROVED\x10\x03\x1A\x1C\x0A\x07Comment\x12\x11\x0A\x04body\x18\x01 \x01(\x09B\x03\xE0A\x02\x1A\xE8\x01\x0A\x04Code\x12\x11\x0A\x04body\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x15\x0A\x05reply\x18\x02 \x01(\x09B\x06\xE0A\x01\xE0A\x04\x12W\x0A\x08position\x18\x03 \x01(\x0B2@.google.cloud.securesourcemanager.v1.PullRequestComment.PositionB\x03\xE0A\x01\x12#\x0A\x16effective_root_comment\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x15\x0A\x08resolved\x18\x05 \x01(\x08B\x03\xE0A\x03\x12!\x0A\x14effective_commit_sha\x18\x07 \x01(\x09B\x03\xE0A\x03\x1A0\x0A\x08Position\x12\x11\x0A\x04path\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x11\x0A\x04line\x18\x02 \x01(\x03B\x03\xE0A\x02:\xB8\x01\xEAA\xB4\x01\x0A5securesourcemanager.googleapis.com/PullRequestComment\x12{projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}/pullRequestComments/{comment}B\x10\x0A\x0Ecomment_detail\"\xB8\x01\x0A\x14ListInstancesRequest\x12C\x0A\x06parent\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x12+securesourcemanager.googleapis.com/Instance\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\"\x87\x01\x0A\x15ListInstancesResponse\x12@\x0A\x09instances\x18\x01 \x03(\x0B2-.google.cloud.securesourcemanager.v1.Instance\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"W\x0A\x12GetInstanceRequest\x12A\x0A\x04name\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+securesourcemanager.googleapis.com/Instance\"\xDD\x01\x0A\x15CreateInstanceRequest\x12C\x0A\x06parent\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x12+securesourcemanager.googleapis.com/Instance\x12\x18\x0A\x0Binstance_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12D\x0A\x08instance\x18\x03 \x01(\x0B2-.google.cloud.securesourcemanager.v1.InstanceB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\x8F\x01\x0A\x15DeleteInstanceRequest\x12A\x0A\x04name\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+securesourcemanager.googleapis.com/Instance\x12\x1F\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\x12\x12\x0A\x05force\x18\x03 \x01(\x08B\x03\xE0A\x01\"\x80\x02\x0A\x11OperationMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x121\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x06target\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04verb\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x1B\x0A\x0Estatus_message\x18\x05 \x01(\x09B\x03\xE0A\x03\x12#\x0A\x16requested_cancellation\x18\x06 \x01(\x08B\x03\xE0A\x03\x12\x18\x0A\x0Bapi_version\x18\x07 \x01(\x09B\x03\xE0A\x03\"\xED\x01\x0A\x17ListRepositoriesRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x12-securesourcemanager.googleapis.com/Repository\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12E\x0A\x08instance\x18\x05 \x01(\x09B3\xE0A\x01\xFAA-\x0A+securesourcemanager.googleapis.com/Instance\"z\x0A\x18ListRepositoriesResponse\x12E\x0A\x0Crepositories\x18\x01 \x03(\x0B2/.google.cloud.securesourcemanager.v1.Repository\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"[\x0A\x14GetRepositoryRequest\x12C\x0A\x04name\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\"\xC6\x01\x0A\x17CreateRepositoryRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x12-securesourcemanager.googleapis.com/Repository\x12H\x0A\x0Arepository\x18\x02 \x01(\x0B2/.google.cloud.securesourcemanager.v1.RepositoryB\x03\xE0A\x02\x12\x1A\x0A\x0Drepository_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"\xB5\x01\x0A\x17UpdateRepositoryRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12H\x0A\x0Arepository\x18\x02 \x01(\x0B2/.google.cloud.securesourcemanager.v1.RepositoryB\x03\xE0A\x02\x12\x1A\x0A\x0Dvalidate_only\x18\x03 \x01(\x08B\x03\xE0A\x01\"z\x0A\x17DeleteRepositoryRequest\x12C\x0A\x04name\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\x12\x1A\x0A\x0Dallow_missing\x18\x02 \x01(\x08B\x03\xE0A\x01\"\x84\x01\x0A\x10ListHooksRequest\x12?\x0A\x06parent\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x12'securesourcemanager.googleapis.com/Hook\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"f\x0A\x11ListHooksResponse\x128\x0A\x05hooks\x18\x01 \x03(\x0B2).google.cloud.securesourcemanager.v1.Hook\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"O\x0A\x0EGetHookRequest\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x0A'securesourcemanager.googleapis.com/Hook\"\xAE\x01\x0A\x11CreateHookRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\x12<\x0A\x04hook\x18\x02 \x01(\x0B2).google.cloud.securesourcemanager.v1.HookB\x03\xE0A\x02\x12\x14\x0A\x07hook_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"\x87\x01\x0A\x11UpdateHookRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12<\x0A\x04hook\x18\x02 \x01(\x0B2).google.cloud.securesourcemanager.v1.HookB\x03\xE0A\x02\"R\x0A\x11DeleteHookRequest\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x0A'securesourcemanager.googleapis.com/Hook\"[\x0A\x14GetBranchRuleRequest\x12C\x0A\x04name\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/BranchRule\"\xC8\x01\x0A\x17CreateBranchRuleRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x12-securesourcemanager.googleapis.com/BranchRule\x12I\x0A\x0Bbranch_rule\x18\x02 \x01(\x0B2/.google.cloud.securesourcemanager.v1.BranchRuleB\x03\xE0A\x02\x12\x1B\x0A\x0Ebranch_rule_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"\x90\x01\x0A\x16ListBranchRulesRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x12-securesourcemanager.googleapis.com/BranchRule\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"z\x0A\x17DeleteBranchRuleRequest\x12C\x0A\x04name\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/BranchRule\x12\x1A\x0A\x0Dallow_missing\x18\x02 \x01(\x08B\x03\xE0A\x01\"\xB6\x01\x0A\x17UpdateBranchRuleRequest\x12I\x0A\x0Bbranch_rule\x18\x01 \x01(\x0B2/.google.cloud.securesourcemanager.v1.BranchRuleB\x03\xE0A\x02\x12\x1A\x0A\x0Dvalidate_only\x18\x02 \x01(\x08B\x03\xE0A\x01\x124\x0A\x0Bupdate_mask\x18\x03 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"y\x0A\x17ListBranchRulesResponse\x12E\x0A\x0Cbranch_rules\x18\x01 \x03(\x0B2/.google.cloud.securesourcemanager.v1.BranchRule\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xAE\x01\x0A\x18CreatePullRequestRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\x12K\x0A\x0Cpull_request\x18\x02 \x01(\x0B20.google.cloud.securesourcemanager.v1.PullRequestB\x03\xE0A\x02\"]\x0A\x15GetPullRequestRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.securesourcemanager.googleapis.com/PullRequest\"\x91\x01\x0A\x17ListPullRequestsRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"|\x0A\x18ListPullRequestsResponse\x12G\x0A\x0Dpull_requests\x18\x01 \x03(\x0B20.google.cloud.securesourcemanager.v1.PullRequest\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x9D\x01\x0A\x18UpdatePullRequestRequest\x12K\x0A\x0Cpull_request\x18\x01 \x01(\x0B20.google.cloud.securesourcemanager.v1.PullRequestB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"_\x0A\x17MergePullRequestRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.securesourcemanager.googleapis.com/PullRequest\"^\x0A\x16OpenPullRequestRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.securesourcemanager.googleapis.com/PullRequest\"_\x0A\x17ClosePullRequestRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.securesourcemanager.googleapis.com/PullRequest\"\x98\x01\x0A\x1FListPullRequestFileDiffsRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.securesourcemanager.googleapis.com/PullRequest\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"~\x0A ListPullRequestFileDiffsResponse\x12A\x0A\x0Afile_diffs\x18\x01 \x03(\x0B2-.google.cloud.securesourcemanager.v1.FileDiff\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x9B\x01\x0A\x12CreateIssueRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\x12>\x0A\x05issue\x18\x02 \x01(\x0B2*.google.cloud.securesourcemanager.v1.IssueB\x03\xE0A\x02\"Q\x0A\x0FGetIssueRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(securesourcemanager.googleapis.com/Issue\"\x9B\x01\x0A\x11ListIssuesRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x12(securesourcemanager.googleapis.com/Issue\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\"i\x0A\x12ListIssuesResponse\x12:\x0A\x06issues\x18\x01 \x03(\x0B2*.google.cloud.securesourcemanager.v1.Issue\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x8A\x01\x0A\x12UpdateIssueRequest\x12>\x0A\x05issue\x18\x01 \x01(\x0B2*.google.cloud.securesourcemanager.v1.IssueB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"g\x0A\x12DeleteIssueRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(securesourcemanager.googleapis.com/Issue\x12\x11\x0A\x04etag\x18\x02 \x01(\x09B\x03\xE0A\x01\"f\x0A\x11CloseIssueRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(securesourcemanager.googleapis.com/Issue\x12\x11\x0A\x04etag\x18\x02 \x01(\x09B\x03\xE0A\x01\"e\x0A\x10OpenIssueRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(securesourcemanager.googleapis.com/Issue\x12\x11\x0A\x04etag\x18\x02 \x01(\x09B\x03\xE0A\x01\"\xEF\x01\x0A\x09TreeEntry\x12L\x0A\x04type\x18\x01 \x01(\x0E29.google.cloud.securesourcemanager.v1.TreeEntry.ObjectTypeB\x03\xE0A\x03\x12\x10\x0A\x03sha\x18\x02 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04path\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04mode\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04size\x18\x05 \x01(\x03B\x03\xE0A\x03\"I\x0A\x0AObjectType\x12\x1B\x0A\x17OBJECT_TYPE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04TREE\x10\x01\x12\x08\x0A\x04BLOB\x10\x02\x12\x0A\x0A\x06COMMIT\x10\x03\"\xB8\x01\x0A\x10FetchTreeRequest\x12I\x0A\x0Arepository\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\x12\x10\x0A\x03ref\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x16\x0A\x09recursive\x18\x03 \x01(\x08B\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x04 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x05 \x01(\x09B\x03\xE0A\x01\"r\x0A\x11FetchTreeResponse\x12D\x0A\x0Ctree_entries\x18\x01 \x03(\x0B2..google.cloud.securesourcemanager.v1.TreeEntry\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"o\x0A\x10FetchBlobRequest\x12I\x0A\x0Arepository\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\x12\x10\x0A\x03sha\x18\x02 \x01(\x09B\x03\xE0A\x02\"1\x0A\x11FetchBlobResponse\x12\x0B\x0A\x03sha\x18\x01 \x01(\x09\x12\x0F\x0A\x07content\x18\x02 \x01(\x09\"\xA0\x01\x0A\x1EListPullRequestCommentsRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125securesourcemanager.googleapis.com/PullRequestComment\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x92\x01\x0A\x1FListPullRequestCommentsResponse\x12V\x0A\x15pull_request_comments\x18\x01 \x03(\x0B27.google.cloud.securesourcemanager.v1.PullRequestComment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xCC\x01\x0A\x1FCreatePullRequestCommentRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125securesourcemanager.googleapis.com/PullRequestComment\x12Z\x0A\x14pull_request_comment\x18\x02 \x01(\x0B27.google.cloud.securesourcemanager.v1.PullRequestCommentB\x03\xE0A\x02\"\xD3\x01\x0A%BatchCreatePullRequestCommentsRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125securesourcemanager.googleapis.com/PullRequestComment\x12[\x0A\x08requests\x18\x02 \x03(\x0B2D.google.cloud.securesourcemanager.v1.CreatePullRequestCommentRequestB\x03\xE0A\x02\"\x80\x01\x0A&BatchCreatePullRequestCommentsResponse\x12V\x0A\x15pull_request_comments\x18\x01 \x03(\x0B27.google.cloud.securesourcemanager.v1.PullRequestComment\"\xB3\x01\x0A\x1FUpdatePullRequestCommentRequest\x12Z\x0A\x14pull_request_comment\x18\x01 \x01(\x0B27.google.cloud.securesourcemanager.v1.PullRequestCommentB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"n\x0A\x1FDeletePullRequestCommentRequest\x12K\x0A\x04name\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x0A5securesourcemanager.googleapis.com/PullRequestComment\"k\x0A\x1CGetPullRequestCommentRequest\x12K\x0A\x04name\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x0A5securesourcemanager.googleapis.com/PullRequestComment\"\xD8\x01\x0A!ResolvePullRequestCommentsRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125securesourcemanager.googleapis.com/PullRequestComment\x12L\x0A\x05names\x18\x02 \x03(\x09B=\xE0A\x02\xFAA7\x0A5securesourcemanager.googleapis.com/PullRequestComment\x12\x16\x0A\x09auto_fill\x18\x03 \x01(\x08B\x03\xE0A\x01\"|\x0A\"ResolvePullRequestCommentsResponse\x12V\x0A\x15pull_request_comments\x18\x01 \x03(\x0B27.google.cloud.securesourcemanager.v1.PullRequestComment\"\xDA\x01\x0A#UnresolvePullRequestCommentsRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125securesourcemanager.googleapis.com/PullRequestComment\x12L\x0A\x05names\x18\x02 \x03(\x09B=\xE0A\x02\xFAA7\x0A5securesourcemanager.googleapis.com/PullRequestComment\x12\x16\x0A\x09auto_fill\x18\x03 \x01(\x08B\x03\xE0A\x01\"~\x0A\$UnresolvePullRequestCommentsResponse\x12V\x0A\x15pull_request_comments\x18\x01 \x03(\x0B27.google.cloud.securesourcemanager.v1.PullRequestComment\"\xAC\x01\x0A\x19CreateIssueCommentRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(securesourcemanager.googleapis.com/Issue\x12M\x0A\x0Dissue_comment\x18\x02 \x01(\x0B21.google.cloud.securesourcemanager.v1.IssueCommentB\x03\xE0A\x02\"_\x0A\x16GetIssueCommentRequest\x12E\x0A\x04name\x18\x01 \x01(\x09B7\xE0A\x02\xFAA1\x0A/securesourcemanager.googleapis.com/IssueComment\"\x94\x01\x0A\x18ListIssueCommentsRequest\x12G\x0A\x06parent\x18\x01 \x01(\x09B7\xE0A\x02\xFAA1\x12/securesourcemanager.googleapis.com/IssueComment\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x7F\x0A\x19ListIssueCommentsResponse\x12I\x0A\x0Eissue_comments\x18\x01 \x03(\x0B21.google.cloud.securesourcemanager.v1.IssueComment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xA0\x01\x0A\x19UpdateIssueCommentRequest\x12M\x0A\x0Dissue_comment\x18\x01 \x01(\x0B21.google.cloud.securesourcemanager.v1.IssueCommentB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"b\x0A\x19DeleteIssueCommentRequest\x12E\x0A\x04name\x18\x01 \x01(\x09B7\xE0A\x02\xFAA1\x0A/securesourcemanager.googleapis.com/IssueComment2\xFEd\x0A\x13SecureSourceManager\x12\xC6\x01\x0A\x0DListInstances\x129.google.cloud.securesourcemanager.v1.ListInstancesRequest\x1A:.google.cloud.securesourcemanager.v1.ListInstancesResponse\">\xDAA\x06parent\x82\xD3\xE4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/instances\x12\xB3\x01\x0A\x0BGetInstance\x127.google.cloud.securesourcemanager.v1.GetInstanceRequest\x1A-.google.cloud.securesourcemanager.v1.Instance\"<\xDAA\x04name\x82\xD3\xE4\x93\x02/\x12-/v1/{name=projects/*/locations/*/instances/*}\x12\xEA\x01\x0A\x0ECreateInstance\x12:.google.cloud.securesourcemanager.v1.CreateInstanceRequest\x1A\x1D.google.longrunning.Operation\"}\xCAA\x1D\x0A\x08Instance\x12\x11OperationMetadata\xDAA\x1Bparent,instance,instance_id\x82\xD3\xE4\x93\x029\"-/v1/{parent=projects/*/locations/*}/instances:\x08instance\x12\xD6\x01\x0A\x0EDeleteInstance\x12:.google.cloud.securesourcemanager.v1.DeleteInstanceRequest\x1A\x1D.google.longrunning.Operation\"i\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02/*-/v1/{name=projects/*/locations/*/instances/*}\x12\xD2\x01\x0A\x10ListRepositories\x12<.google.cloud.securesourcemanager.v1.ListRepositoriesRequest\x1A=.google.cloud.securesourcemanager.v1.ListRepositoriesResponse\"A\xDAA\x06parent\x82\xD3\xE4\x93\x022\x120/v1/{parent=projects/*/locations/*}/repositories\x12\xBC\x01\x0A\x0DGetRepository\x129.google.cloud.securesourcemanager.v1.GetRepositoryRequest\x1A/.google.cloud.securesourcemanager.v1.Repository\"?\xDAA\x04name\x82\xD3\xE4\x93\x022\x120/v1/{name=projects/*/locations/*/repositories/*}\x12\xFA\x01\x0A\x10CreateRepository\x12<.google.cloud.securesourcemanager.v1.CreateRepositoryRequest\x1A\x1D.google.longrunning.Operation\"\x88\x01\xCAA\x1F\x0A\x0ARepository\x12\x11OperationMetadata\xDAA\x1Fparent,repository,repository_id\x82\xD3\xE4\x93\x02>\"0/v1/{parent=projects/*/locations/*}/repositories:\x0Arepository\x12\xFC\x01\x0A\x10UpdateRepository\x12<.google.cloud.securesourcemanager.v1.UpdateRepositoryRequest\x1A\x1D.google.longrunning.Operation\"\x8A\x01\xCAA\x1F\x0A\x0ARepository\x12\x11OperationMetadata\xDAA\x16repository,update_mask\x82\xD3\xE4\x93\x02I2;/v1/{repository.name=projects/*/locations/*/repositories/*}:\x0Arepository\x12\xDD\x01\x0A\x10DeleteRepository\x12<.google.cloud.securesourcemanager.v1.DeleteRepositoryRequest\x1A\x1D.google.longrunning.Operation\"l\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x022*0/v1/{name=projects/*/locations/*/repositories/*}\x12\xC5\x01\x0A\x09ListHooks\x125.google.cloud.securesourcemanager.v1.ListHooksRequest\x1A6.google.cloud.securesourcemanager.v1.ListHooksResponse\"I\xDAA\x06parent\x82\xD3\xE4\x93\x02:\x128/v1/{parent=projects/*/locations/*/repositories/*}/hooks\x12\xB2\x01\x0A\x07GetHook\x123.google.cloud.securesourcemanager.v1.GetHookRequest\x1A).google.cloud.securesourcemanager.v1.Hook\"G\xDAA\x04name\x82\xD3\xE4\x93\x02:\x128/v1/{name=projects/*/locations/*/repositories/*/hooks/*}\x12\xDD\x01\x0A\x0ACreateHook\x126.google.cloud.securesourcemanager.v1.CreateHookRequest\x1A\x1D.google.longrunning.Operation\"x\xCAA\x19\x0A\x04Hook\x12\x11OperationMetadata\xDAA\x13parent,hook,hook_id\x82\xD3\xE4\x93\x02@\"8/v1/{parent=projects/*/locations/*/repositories/*}/hooks:\x04hook\x12\xDF\x01\x0A\x0AUpdateHook\x126.google.cloud.securesourcemanager.v1.UpdateHookRequest\x1A\x1D.google.longrunning.Operation\"z\xCAA\x19\x0A\x04Hook\x12\x11OperationMetadata\xDAA\x10hook,update_mask\x82\xD3\xE4\x93\x02E2=/v1/{hook.name=projects/*/locations/*/repositories/*/hooks/*}:\x04hook\x12\xD9\x01\x0A\x0ADeleteHook\x126.google.cloud.securesourcemanager.v1.DeleteHookRequest\x1A\x1D.google.longrunning.Operation\"t\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02:*8/v1/{name=projects/*/locations/*/repositories/*/hooks/*}\x12\xA3\x01\x0A\x10GetIamPolicyRepo\x12\".google.iam.v1.GetIamPolicyRequest\x1A\x15.google.iam.v1.Policy\"T\xDAA\x08resource\x82\xD3\xE4\x93\x02C\x12A/v1/{resource=projects/*/locations/*/repositories/*}:getIamPolicy\x12\xA6\x01\x0A\x10SetIamPolicyRepo\x12\".google.iam.v1.SetIamPolicyRequest\x1A\x15.google.iam.v1.Policy\"W\xDAA\x08resource\x82\xD3\xE4\x93\x02F\"A/v1/{resource=projects/*/locations/*/repositories/*}:setIamPolicy:\x01*\x12\xCC\x01\x0A\x16TestIamPermissionsRepo\x12(.google.iam.v1.TestIamPermissionsRequest\x1A).google.iam.v1.TestIamPermissionsResponse\"]\xDAA\x08resource\x82\xD3\xE4\x93\x02L\"G/v1/{resource=projects/*/locations/*/repositories/*}:testIamPermissions:\x01*\x12\x8B\x02\x0A\x10CreateBranchRule\x12<.google.cloud.securesourcemanager.v1.CreateBranchRuleRequest\x1A\x1D.google.longrunning.Operation\"\x99\x01\xCAA\x1F\x0A\x0ABranchRule\x12\x11OperationMetadata\xDAA!parent,branch_rule,branch_rule_id\x82\xD3\xE4\x93\x02M\">/v1/{parent=projects/*/locations/*/repositories/*}/branchRules:\x0Bbranch_rule\x12\xDD\x01\x0A\x0FListBranchRules\x12;.google.cloud.securesourcemanager.v1.ListBranchRulesRequest\x1A<.google.cloud.securesourcemanager.v1.ListBranchRulesResponse\"O\xDAA\x06parent\x82\xD3\xE4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/repositories/*}/branchRules\x12\xCA\x01\x0A\x0DGetBranchRule\x129.google.cloud.securesourcemanager.v1.GetBranchRuleRequest\x1A/.google.cloud.securesourcemanager.v1.BranchRule\"M\xDAA\x04name\x82\xD3\xE4\x93\x02@\x12>/v1/{name=projects/*/locations/*/repositories/*/branchRules/*}\x12\x8D\x02\x0A\x10UpdateBranchRule\x12<.google.cloud.securesourcemanager.v1.UpdateBranchRuleRequest\x1A\x1D.google.longrunning.Operation\"\x9B\x01\xCAA\x1F\x0A\x0ABranchRule\x12\x11OperationMetadata\xDAA\x17branch_rule,update_mask\x82\xD3\xE4\x93\x02Y2J/v1/{branch_rule.name=projects/*/locations/*/repositories/*/branchRules/*}:\x0Bbranch_rule\x12\xEB\x01\x0A\x10DeleteBranchRule\x12<.google.cloud.securesourcemanager.v1.DeleteBranchRuleRequest\x1A\x1D.google.longrunning.Operation\"z\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02@*>/v1/{name=projects/*/locations/*/repositories/*/branchRules/*}\x12\xA6\x02\x0A\x11CreatePullRequest\x12=.google.cloud.securesourcemanager.v1.CreatePullRequestRequest\x1A\x1D.google.longrunning.Operation\"\xB2\x01\xCAAD\x0A/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xDAA\x13parent,pull_request\x82\xD3\xE4\x93\x02O\"?/v1/{parent=projects/*/locations/*/repositories/*}/pullRequests:\x0Cpull_request\x12\xCE\x01\x0A\x0EGetPullRequest\x12:.google.cloud.securesourcemanager.v1.GetPullRequestRequest\x1A0.google.cloud.securesourcemanager.v1.PullRequest\"N\xDAA\x04name\x82\xD3\xE4\x93\x02A\x12?/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}\x12\xE1\x01\x0A\x10ListPullRequests\x12<.google.cloud.securesourcemanager.v1.ListPullRequestsRequest\x1A=.google.cloud.securesourcemanager.v1.ListPullRequestsResponse\"P\xDAA\x06parent\x82\xD3\xE4\x93\x02A\x12?/v1/{parent=projects/*/locations/*/repositories/*}/pullRequests\x12\xB8\x02\x0A\x11UpdatePullRequest\x12=.google.cloud.securesourcemanager.v1.UpdatePullRequestRequest\x1A\x1D.google.longrunning.Operation\"\xC4\x01\xCAAD\x0A/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xDAA\x18pull_request,update_mask\x82\xD3\xE4\x93\x02\\2L/v1/{pull_request.name=projects/*/locations/*/repositories/*/pullRequests/*}:\x0Cpull_request\x12\x90\x02\x0A\x10MergePullRequest\x12<.google.cloud.securesourcemanager.v1.MergePullRequestRequest\x1A\x1D.google.longrunning.Operation\"\x9E\x01\xCAAD\x0A/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02J\"E/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:merge:\x01*\x12\x8D\x02\x0A\x0FOpenPullRequest\x12;.google.cloud.securesourcemanager.v1.OpenPullRequestRequest\x1A\x1D.google.longrunning.Operation\"\x9D\x01\xCAAD\x0A/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02I\"D/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:open:\x01*\x12\x90\x02\x0A\x10ClosePullRequest\x12<.google.cloud.securesourcemanager.v1.ClosePullRequestRequest\x1A\x1D.google.longrunning.Operation\"\x9E\x01\xCAAD\x0A/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02J\"E/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:close:\x01*\x12\x85\x02\x0A\x18ListPullRequestFileDiffs\x12D.google.cloud.securesourcemanager.v1.ListPullRequestFileDiffsRequest\x1AE.google.cloud.securesourcemanager.v1.ListPullRequestFileDiffsResponse\"\\\xDAA\x04name\x82\xD3\xE4\x93\x02O\x12M/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:listFileDiffs\x12\xC4\x01\x0A\x09FetchTree\x125.google.cloud.securesourcemanager.v1.FetchTreeRequest\x1A6.google.cloud.securesourcemanager.v1.FetchTreeResponse\"H\x82\xD3\xE4\x93\x02B\x12@/v1/{repository=projects/*/locations/*/repositories/*}:fetchTree\x12\xC4\x01\x0A\x09FetchBlob\x125.google.cloud.securesourcemanager.v1.FetchBlobRequest\x1A6.google.cloud.securesourcemanager.v1.FetchBlobResponse\"H\x82\xD3\xE4\x93\x02B\x12@/v1/{repository=projects/*/locations/*/repositories/*}:fetchBlob\x12\x80\x02\x0A\x0BCreateIssue\x127.google.cloud.securesourcemanager.v1.CreateIssueRequest\x1A\x1D.google.longrunning.Operation\"\x98\x01\xCAA>\x0A)google.cloud.securesourcemanager.v1.Issue\x12\x11OperationMetadata\xDAA\x0Cparent,issue\x82\xD3\xE4\x93\x02B\"9/v1/{parent=projects/*/locations/*/repositories/*}/issues:\x05issue\x12\xB6\x01\x0A\x08GetIssue\x124.google.cloud.securesourcemanager.v1.GetIssueRequest\x1A*.google.cloud.securesourcemanager.v1.Issue\"H\xDAA\x04name\x82\xD3\xE4\x93\x02;\x129/v1/{name=projects/*/locations/*/repositories/*/issues/*}\x12\xC9\x01\x0A\x0AListIssues\x126.google.cloud.securesourcemanager.v1.ListIssuesRequest\x1A7.google.cloud.securesourcemanager.v1.ListIssuesResponse\"J\xDAA\x06parent\x82\xD3\xE4\x93\x02;\x129/v1/{parent=projects/*/locations/*/repositories/*}/issues\x12\x8B\x02\x0A\x0BUpdateIssue\x127.google.cloud.securesourcemanager.v1.UpdateIssueRequest\x1A\x1D.google.longrunning.Operation\"\xA3\x01\xCAA>\x0A)google.cloud.securesourcemanager.v1.Issue\x12\x11OperationMetadata\xDAA\x11issue,update_mask\x82\xD3\xE4\x93\x02H2?/v1/{issue.name=projects/*/locations/*/repositories/*/issues/*}:\x05issue\x12\xDC\x01\x0A\x0BDeleteIssue\x127.google.cloud.securesourcemanager.v1.DeleteIssueRequest\x1A\x1D.google.longrunning.Operation\"u\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02;*9/v1/{name=projects/*/locations/*/repositories/*/issues/*}\x12\xF5\x01\x0A\x09OpenIssue\x125.google.cloud.securesourcemanager.v1.OpenIssueRequest\x1A\x1D.google.longrunning.Operation\"\x91\x01\xCAA>\x0A)google.cloud.securesourcemanager.v1.Issue\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02C\">/v1/{name=projects/*/locations/*/repositories/*/issues/*}:open:\x01*\x12\xF8\x01\x0A\x0ACloseIssue\x126.google.cloud.securesourcemanager.v1.CloseIssueRequest\x1A\x1D.google.longrunning.Operation\"\x92\x01\xCAA>\x0A)google.cloud.securesourcemanager.v1.Issue\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02D\"?/v1/{name=projects/*/locations/*/repositories/*/issues/*}:close:\x01*\x12\xF9\x01\x0A\x15GetPullRequestComment\x12A.google.cloud.securesourcemanager.v1.GetPullRequestCommentRequest\x1A7.google.cloud.securesourcemanager.v1.PullRequestComment\"d\xDAA\x04name\x82\xD3\xE4\x93\x02W\x12U/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*/pullRequestComments/*}\x12\x8C\x02\x0A\x17ListPullRequestComments\x12C.google.cloud.securesourcemanager.v1.ListPullRequestCommentsRequest\x1AD.google.cloud.securesourcemanager.v1.ListPullRequestCommentsResponse\"f\xDAA\x06parent\x82\xD3\xE4\x93\x02W\x12U/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments\x12\xE1\x02\x0A\x18CreatePullRequestComment\x12D.google.cloud.securesourcemanager.v1.CreatePullRequestCommentRequest\x1A\x1D.google.longrunning.Operation\"\xDF\x01\xCAAK\x0A6google.cloud.securesourcemanager.v1.PullRequestComment\x12\x11OperationMetadata\xDAA\x1Bparent,pull_request_comment\x82\xD3\xE4\x93\x02m\"U/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:\x14pull_request_comment\x12\xFC\x02\x0A\x18UpdatePullRequestComment\x12D.google.cloud.securesourcemanager.v1.UpdatePullRequestCommentRequest\x1A\x1D.google.longrunning.Operation\"\xFA\x01\xCAAK\x0A6google.cloud.securesourcemanager.v1.PullRequestComment\x12\x11OperationMetadata\xDAA pull_request_comment,update_mask\x82\xD3\xE4\x93\x02\x82\x012j/v1/{pull_request_comment.name=projects/*/locations/*/repositories/*/pullRequests/*/pullRequestComments/*}:\x14pull_request_comment\x12\x93\x02\x0A\x18DeletePullRequestComment\x12D.google.cloud.securesourcemanager.v1.DeletePullRequestCommentRequest\x1A\x1D.google.longrunning.Operation\"\x91\x01\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02W*U/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*/pullRequestComments/*}\x12\xCA\x02\x0A\x1EBatchCreatePullRequestComments\x12J.google.cloud.securesourcemanager.v1.BatchCreatePullRequestCommentsRequest\x1A\x1D.google.longrunning.Operation\"\xBC\x01\xCAA;\x0A&BatchCreatePullRequestCommentsResponse\x12\x11OperationMetadata\xDAA\x0Fparent,requests\x82\xD3\xE4\x93\x02f\"a/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:batchCreate:\x01*\x12\xB7\x02\x0A\x1AResolvePullRequestComments\x12F.google.cloud.securesourcemanager.v1.ResolvePullRequestCommentsRequest\x1A\x1D.google.longrunning.Operation\"\xB1\x01\xCAA7\x0A\"ResolvePullRequestCommentsResponse\x12\x11OperationMetadata\xDAA\x0Cparent,names\x82\xD3\xE4\x93\x02b\"]/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:resolve:\x01*\x12\xBF\x02\x0A\x1CUnresolvePullRequestComments\x12H.google.cloud.securesourcemanager.v1.UnresolvePullRequestCommentsRequest\x1A\x1D.google.longrunning.Operation\"\xB5\x01\xCAA9\x0A\$UnresolvePullRequestCommentsResponse\x12\x11OperationMetadata\xDAA\x0Cparent,names\x82\xD3\xE4\x93\x02d\"_/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:unresolve:\x01*\x12\xB5\x02\x0A\x12CreateIssueComment\x12>.google.cloud.securesourcemanager.v1.CreateIssueCommentRequest\x1A\x1D.google.longrunning.Operation\"\xBF\x01\xCAAE\x0A0google.cloud.securesourcemanager.v1.IssueComment\x12\x11OperationMetadata\xDAA\x14parent,issue_comment\x82\xD3\xE4\x93\x02Z\"I/v1/{parent=projects/*/locations/*/repositories/*/issues/*}/issueComments:\x0Dissue_comment\x12\xDB\x01\x0A\x0FGetIssueComment\x12;.google.cloud.securesourcemanager.v1.GetIssueCommentRequest\x1A1.google.cloud.securesourcemanager.v1.IssueComment\"X\xDAA\x04name\x82\xD3\xE4\x93\x02K\x12I/v1/{name=projects/*/locations/*/repositories/*/issues/*/issueComments/*}\x12\xEE\x01\x0A\x11ListIssueComments\x12=.google.cloud.securesourcemanager.v1.ListIssueCommentsRequest\x1A>.google.cloud.securesourcemanager.v1.ListIssueCommentsResponse\"Z\xDAA\x06parent\x82\xD3\xE4\x93\x02K\x12I/v1/{parent=projects/*/locations/*/repositories/*/issues/*}/issueComments\x12\xC8\x02\x0A\x12UpdateIssueComment\x12>.google.cloud.securesourcemanager.v1.UpdateIssueCommentRequest\x1A\x1D.google.longrunning.Operation\"\xD2\x01\xCAAE\x0A0google.cloud.securesourcemanager.v1.IssueComment\x12\x11OperationMetadata\xDAA\x19issue_comment,update_mask\x82\xD3\xE4\x93\x02h2W/v1/{issue_comment.name=projects/*/locations/*/repositories/*/issues/*/issueComments/*}:\x0Dissue_comment\x12\xFB\x01\x0A\x12DeleteIssueComment\x12>.google.cloud.securesourcemanager.v1.DeleteIssueCommentRequest\x1A\x1D.google.longrunning.Operation\"\x85\x01\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02K*I/v1/{name=projects/*/locations/*/repositories/*/issues/*/issueComments/*}\x1AV\xCAA\"securesourcemanager.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xE9\x04\x0A'com.google.cloud.securesourcemanager.v1B\x18SecureSourceManagerProtoP\x01ZYcloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb;securesourcemanagerpb\xAA\x02#Google.Cloud.SecureSourceManager.V1\xCA\x02#Google\\Cloud\\SecureSourceManager\\V1\xEA\x02&Google::Cloud::SecureSourceManager::V1\xEAAx\x0A!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xEAA\\\x0A\x1Fprivateca.googleapis.com/CaPool\x129projects/{project}/locations/{location}/caPools/{ca_pool}\xEAAw\x0A(compute.googleapis.com/ServiceAttachment\x12Kprojects/{project}/regions/{region}/serviceAttachments/{service_attachment}b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BatchCreatePullRequestCommentsRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BatchCreatePullRequestCommentsRequest.php new file mode 100644 index 000000000000..3079601b5521 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BatchCreatePullRequestCommentsRequest.php @@ -0,0 +1,142 @@ +google.cloud.securesourcemanager.v1.BatchCreatePullRequestCommentsRequest + */ +class BatchCreatePullRequestCommentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * 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}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * 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 + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.CreatePullRequestCommentRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + + /** + * @param string $parent 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}` + * Please see {@see SecureSourceManagerClient::pullRequestName()} for help formatting this field. + * @param \Google\Cloud\SecureSourceManager\V1\CreatePullRequestCommentRequest[] $requests 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 + * + * @return \Google\Cloud\SecureSourceManager\V1\BatchCreatePullRequestCommentsRequest + * + * @experimental + */ + public static function build(string $parent, array $requests): self + { + return (new self()) + ->setParent($parent) + ->setRequests($requests); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * 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}` + * @type \Google\Cloud\SecureSourceManager\V1\CreatePullRequestCommentRequest[] $requests + * 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 + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * 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}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * 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}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * 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 + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.CreatePullRequestCommentRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\CreatePullRequestCommentRequest> + */ + public function getRequests() + { + return $this->requests; + } + + /** + * 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 + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.CreatePullRequestCommentRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecureSourceManager\V1\CreatePullRequestCommentRequest[] $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\CreatePullRequestCommentRequest::class); + $this->requests = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BatchCreatePullRequestCommentsResponse.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BatchCreatePullRequestCommentsResponse.php new file mode 100644 index 000000000000..3a698f4d30a2 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BatchCreatePullRequestCommentsResponse.php @@ -0,0 +1,67 @@ +google.cloud.securesourcemanager.v1.BatchCreatePullRequestCommentsResponse + */ +class BatchCreatePullRequestCommentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of pull request comments created. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comments = 1; + */ + private $pull_request_comments; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecureSourceManager\V1\PullRequestComment[] $pull_request_comments + * The list of pull request comments created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * The list of pull request comments created. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comments = 1; + * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\PullRequestComment> + */ + public function getPullRequestComments() + { + return $this->pull_request_comments; + } + + /** + * The list of pull request comments created. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comments = 1; + * @param \Google\Cloud\SecureSourceManager\V1\PullRequestComment[] $var + * @return $this + */ + public function setPullRequestComments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\PullRequestComment::class); + $this->pull_request_comments = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BranchRule.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BranchRule.php new file mode 100644 index 000000000000..a78b823d4027 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BranchRule.php @@ -0,0 +1,658 @@ +google.cloud.securesourcemanager.v1.BranchRule + */ +class BranchRule extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. A unique identifier for a BranchRule. The name should be of the + * format: + * `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Unique identifier of the repository. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + */ + protected $uid = ''; + /** + * Output only. Create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. User annotations. These attributes can only be set and used by + * the user. See https://google.aip.dev/128#annotations for more details such + * as format and size limitations. + * + * Generated from protobuf field map annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $annotations; + /** + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + /** + * Optional. The pattern of the branch that can match to this BranchRule. + * Specified as regex. + * .* for all branches. Examples: main, (main|release.*). + * Current MVP phase only support `.*` for wildcard. + * + * Generated from protobuf field string include_pattern = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $include_pattern = ''; + /** + * Optional. Determines if the branch rule is disabled or not. + * + * Generated from protobuf field bool disabled = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $disabled = false; + /** + * Optional. Determines if the branch rule requires a pull request or not. + * + * Generated from protobuf field bool require_pull_request = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $require_pull_request = false; + /** + * Optional. The minimum number of reviews required for the branch rule to be + * matched. + * + * Generated from protobuf field int32 minimum_reviews_count = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $minimum_reviews_count = 0; + /** + * Optional. The minimum number of approvals required for the branch rule to + * be matched. + * + * Generated from protobuf field int32 minimum_approvals_count = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $minimum_approvals_count = 0; + /** + * Optional. Determines if code owners must approve before merging to the + * branch. + * + * Generated from protobuf field bool require_code_owner_approval = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $require_code_owner_approval = false; + /** + * Optional. Determines if require comments resolved before merging to the + * branch. + * + * Generated from protobuf field bool require_comments_resolved = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $require_comments_resolved = false; + /** + * Optional. Determines if allow stale reviews or approvals before merging to + * the branch. + * + * Generated from protobuf field bool allow_stale_reviews = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $allow_stale_reviews = false; + /** + * Optional. Determines if require linear history before merging to the + * branch. + * + * Generated from protobuf field bool require_linear_history = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $require_linear_history = false; + /** + * Optional. List of required status checks before merging to the branch. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.BranchRule.Check required_status_checks = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $required_status_checks; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. A unique identifier for a BranchRule. The name should be of the + * format: + * `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}` + * @type string $uid + * Output only. Unique identifier of the repository. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Create timestamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Update timestamp. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Optional. User annotations. These attributes can only be set and used by + * the user. See https://google.aip.dev/128#annotations for more details such + * as format and size limitations. + * @type string $etag + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * @type string $include_pattern + * Optional. The pattern of the branch that can match to this BranchRule. + * Specified as regex. + * .* for all branches. Examples: main, (main|release.*). + * Current MVP phase only support `.*` for wildcard. + * @type bool $disabled + * Optional. Determines if the branch rule is disabled or not. + * @type bool $require_pull_request + * Optional. Determines if the branch rule requires a pull request or not. + * @type int $minimum_reviews_count + * Optional. The minimum number of reviews required for the branch rule to be + * matched. + * @type int $minimum_approvals_count + * Optional. The minimum number of approvals required for the branch rule to + * be matched. + * @type bool $require_code_owner_approval + * Optional. Determines if code owners must approve before merging to the + * branch. + * @type bool $require_comments_resolved + * Optional. Determines if require comments resolved before merging to the + * branch. + * @type bool $allow_stale_reviews + * Optional. Determines if allow stale reviews or approvals before merging to + * the branch. + * @type bool $require_linear_history + * Optional. Determines if require linear history before merging to the + * branch. + * @type \Google\Cloud\SecureSourceManager\V1\BranchRule\Check[] $required_status_checks + * Optional. List of required status checks before merging to the branch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. A unique identifier for a BranchRule. The name should be of the + * format: + * `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. A unique identifier for a BranchRule. The name should be of the + * format: + * `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Unique identifier of the repository. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. Unique identifier of the repository. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. Create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional. User annotations. These attributes can only be set and used by + * the user. See https://google.aip.dev/128#annotations for more details such + * as format and size limitations. + * + * Generated from protobuf field map annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Optional. User annotations. These attributes can only be set and used by + * the user. See https://google.aip.dev/128#annotations for more details such + * as format and size limitations. + * + * Generated from protobuf field map annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Optional. The pattern of the branch that can match to this BranchRule. + * Specified as regex. + * .* for all branches. Examples: main, (main|release.*). + * Current MVP phase only support `.*` for wildcard. + * + * Generated from protobuf field string include_pattern = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getIncludePattern() + { + return $this->include_pattern; + } + + /** + * Optional. The pattern of the branch that can match to this BranchRule. + * Specified as regex. + * .* for all branches. Examples: main, (main|release.*). + * Current MVP phase only support `.*` for wildcard. + * + * Generated from protobuf field string include_pattern = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setIncludePattern($var) + { + GPBUtil::checkString($var, True); + $this->include_pattern = $var; + + return $this; + } + + /** + * Optional. Determines if the branch rule is disabled or not. + * + * Generated from protobuf field bool disabled = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getDisabled() + { + return $this->disabled; + } + + /** + * Optional. Determines if the branch rule is disabled or not. + * + * Generated from protobuf field bool disabled = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setDisabled($var) + { + GPBUtil::checkBool($var); + $this->disabled = $var; + + return $this; + } + + /** + * Optional. Determines if the branch rule requires a pull request or not. + * + * Generated from protobuf field bool require_pull_request = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getRequirePullRequest() + { + return $this->require_pull_request; + } + + /** + * Optional. Determines if the branch rule requires a pull request or not. + * + * Generated from protobuf field bool require_pull_request = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setRequirePullRequest($var) + { + GPBUtil::checkBool($var); + $this->require_pull_request = $var; + + return $this; + } + + /** + * Optional. The minimum number of reviews required for the branch rule to be + * matched. + * + * Generated from protobuf field int32 minimum_reviews_count = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMinimumReviewsCount() + { + return $this->minimum_reviews_count; + } + + /** + * Optional. The minimum number of reviews required for the branch rule to be + * matched. + * + * Generated from protobuf field int32 minimum_reviews_count = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMinimumReviewsCount($var) + { + GPBUtil::checkInt32($var); + $this->minimum_reviews_count = $var; + + return $this; + } + + /** + * Optional. The minimum number of approvals required for the branch rule to + * be matched. + * + * Generated from protobuf field int32 minimum_approvals_count = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMinimumApprovalsCount() + { + return $this->minimum_approvals_count; + } + + /** + * Optional. The minimum number of approvals required for the branch rule to + * be matched. + * + * Generated from protobuf field int32 minimum_approvals_count = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMinimumApprovalsCount($var) + { + GPBUtil::checkInt32($var); + $this->minimum_approvals_count = $var; + + return $this; + } + + /** + * Optional. Determines if code owners must approve before merging to the + * branch. + * + * Generated from protobuf field bool require_code_owner_approval = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getRequireCodeOwnerApproval() + { + return $this->require_code_owner_approval; + } + + /** + * Optional. Determines if code owners must approve before merging to the + * branch. + * + * Generated from protobuf field bool require_code_owner_approval = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setRequireCodeOwnerApproval($var) + { + GPBUtil::checkBool($var); + $this->require_code_owner_approval = $var; + + return $this; + } + + /** + * Optional. Determines if require comments resolved before merging to the + * branch. + * + * Generated from protobuf field bool require_comments_resolved = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getRequireCommentsResolved() + { + return $this->require_comments_resolved; + } + + /** + * Optional. Determines if require comments resolved before merging to the + * branch. + * + * Generated from protobuf field bool require_comments_resolved = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setRequireCommentsResolved($var) + { + GPBUtil::checkBool($var); + $this->require_comments_resolved = $var; + + return $this; + } + + /** + * Optional. Determines if allow stale reviews or approvals before merging to + * the branch. + * + * Generated from protobuf field bool allow_stale_reviews = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAllowStaleReviews() + { + return $this->allow_stale_reviews; + } + + /** + * Optional. Determines if allow stale reviews or approvals before merging to + * the branch. + * + * Generated from protobuf field bool allow_stale_reviews = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAllowStaleReviews($var) + { + GPBUtil::checkBool($var); + $this->allow_stale_reviews = $var; + + return $this; + } + + /** + * Optional. Determines if require linear history before merging to the + * branch. + * + * Generated from protobuf field bool require_linear_history = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getRequireLinearHistory() + { + return $this->require_linear_history; + } + + /** + * Optional. Determines if require linear history before merging to the + * branch. + * + * Generated from protobuf field bool require_linear_history = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setRequireLinearHistory($var) + { + GPBUtil::checkBool($var); + $this->require_linear_history = $var; + + return $this; + } + + /** + * Optional. List of required status checks before merging to the branch. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.BranchRule.Check required_status_checks = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\BranchRule\Check> + */ + public function getRequiredStatusChecks() + { + return $this->required_status_checks; + } + + /** + * Optional. List of required status checks before merging to the branch. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.BranchRule.Check required_status_checks = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SecureSourceManager\V1\BranchRule\Check[] $var + * @return $this + */ + public function setRequiredStatusChecks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\BranchRule\Check::class); + $this->required_status_checks = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BranchRule/Check.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BranchRule/Check.php new file mode 100644 index 000000000000..738976a8d23a --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BranchRule/Check.php @@ -0,0 +1,67 @@ +google.cloud.securesourcemanager.v1.BranchRule.Check + */ +class Check extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The context of the check. + * + * Generated from protobuf field string context = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $context = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $context + * Required. The context of the check. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The context of the check. + * + * Generated from protobuf field string context = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getContext() + { + return $this->context; + } + + /** + * Required. The context of the check. + * + * Generated from protobuf field string context = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setContext($var) + { + GPBUtil::checkString($var, True); + $this->context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CloseIssueRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CloseIssueRequest.php new file mode 100644 index 000000000000..5d127aa07c4a --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CloseIssueRequest.php @@ -0,0 +1,133 @@ +google.cloud.securesourcemanager.v1.CloseIssueRequest + */ +class CloseIssueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the issue to close. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The current etag of the issue. + * If the etag is provided and does not match the current etag of the issue, + * closing will be blocked and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + + /** + * @param string $name Required. Name of the issue to close. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. Please see + * {@see SecureSourceManagerClient::issueName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\CloseIssueRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the issue to close. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + * @type string $etag + * Optional. The current etag of the issue. + * If the etag is provided and does not match the current etag of the issue, + * closing will be blocked and an ABORTED error will be returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the issue to close. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the issue to close. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The current etag of the issue. + * If the etag is provided and does not match the current etag of the issue, + * closing will be blocked and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. The current etag of the issue. + * If the etag is provided and does not match the current etag of the issue, + * closing will be blocked and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ClosePullRequestRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ClosePullRequestRequest.php new file mode 100644 index 000000000000..380a097096b7 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ClosePullRequestRequest.php @@ -0,0 +1,91 @@ +google.cloud.securesourcemanager.v1.ClosePullRequestRequest + */ +class ClosePullRequestRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The pull request to close. + * Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The pull request to close. + * Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + * Please see {@see SecureSourceManagerClient::pullRequestName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\ClosePullRequestRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The pull request to close. + * Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The pull request to close. + * Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The pull request to close. + * Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateBranchRuleRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateBranchRuleRequest.php new file mode 100644 index 000000000000..561ef521d29a --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateBranchRuleRequest.php @@ -0,0 +1,141 @@ +google.cloud.securesourcemanager.v1.CreateBranchRuleRequest + */ +class CreateBranchRuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Generated from protobuf field .google.cloud.securesourcemanager.v1.BranchRule branch_rule = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $branch_rule = null; + /** + * Generated from protobuf field string branch_rule_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $branch_rule_id = ''; + + /** + * @param string $parent Please see {@see SecureSourceManagerClient::repositoryName()} for help formatting this field. + * @param \Google\Cloud\SecureSourceManager\V1\BranchRule $branchRule + * @param string $branchRuleId + * + * @return \Google\Cloud\SecureSourceManager\V1\CreateBranchRuleRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\SecureSourceManager\V1\BranchRule $branchRule, string $branchRuleId): self + { + return (new self()) + ->setParent($parent) + ->setBranchRule($branchRule) + ->setBranchRuleId($branchRuleId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * @type \Google\Cloud\SecureSourceManager\V1\BranchRule $branch_rule + * @type string $branch_rule_id + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.securesourcemanager.v1.BranchRule branch_rule = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecureSourceManager\V1\BranchRule|null + */ + public function getBranchRule() + { + return $this->branch_rule; + } + + public function hasBranchRule() + { + return isset($this->branch_rule); + } + + public function clearBranchRule() + { + unset($this->branch_rule); + } + + /** + * Generated from protobuf field .google.cloud.securesourcemanager.v1.BranchRule branch_rule = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecureSourceManager\V1\BranchRule $var + * @return $this + */ + public function setBranchRule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\BranchRule::class); + $this->branch_rule = $var; + + return $this; + } + + /** + * Generated from protobuf field string branch_rule_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBranchRuleId() + { + return $this->branch_rule_id; + } + + /** + * Generated from protobuf field string branch_rule_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBranchRuleId($var) + { + GPBUtil::checkString($var, True); + $this->branch_rule_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateHookRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateHookRequest.php new file mode 100644 index 000000000000..37f0d1f505b9 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateHookRequest.php @@ -0,0 +1,188 @@ +google.cloud.securesourcemanager.v1.CreateHookRequest + */ +class CreateHookRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The repository in which to create the hook. Values are of the + * form + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Hook hook = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $hook = null; + /** + * 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. + * + * Generated from protobuf field string hook_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $hook_id = ''; + + /** + * @param string $parent Required. The repository in which to create the hook. Values are of the + * form + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + * Please see {@see SecureSourceManagerClient::repositoryName()} for help formatting this field. + * @param \Google\Cloud\SecureSourceManager\V1\Hook $hook Required. The resource being created. + * @param string $hookId 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. + * + * @return \Google\Cloud\SecureSourceManager\V1\CreateHookRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\SecureSourceManager\V1\Hook $hook, string $hookId): self + { + return (new self()) + ->setParent($parent) + ->setHook($hook) + ->setHookId($hookId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The repository in which to create the hook. Values are of the + * form + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + * @type \Google\Cloud\SecureSourceManager\V1\Hook $hook + * Required. The resource being created. + * @type string $hook_id + * 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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The repository in which to create the hook. Values are of the + * form + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The repository in which to create the hook. Values are of the + * form + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Hook hook = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecureSourceManager\V1\Hook|null + */ + public function getHook() + { + return $this->hook; + } + + public function hasHook() + { + return isset($this->hook); + } + + public function clearHook() + { + unset($this->hook); + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Hook hook = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecureSourceManager\V1\Hook $var + * @return $this + */ + public function setHook($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\Hook::class); + $this->hook = $var; + + return $this; + } + + /** + * 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. + * + * Generated from protobuf field string hook_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getHookId() + { + return $this->hook_id; + } + + /** + * 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. + * + * Generated from protobuf field string hook_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setHookId($var) + { + GPBUtil::checkString($var, True); + $this->hook_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateInstanceRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateInstanceRequest.php new file mode 100644 index 000000000000..a0094b4d8bdf --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateInstanceRequest.php @@ -0,0 +1,237 @@ +google.cloud.securesourcemanager.v1.CreateInstanceRequest + */ +class CreateInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. ID of the instance to be created. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance_id = ''; + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see SecureSourceManagerClient::locationName()} for help formatting this field. + * @param \Google\Cloud\SecureSourceManager\V1\Instance $instance Required. The resource being created. + * @param string $instanceId Required. ID of the instance to be created. + * + * @return \Google\Cloud\SecureSourceManager\V1\CreateInstanceRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\SecureSourceManager\V1\Instance $instance, string $instanceId): self + { + return (new self()) + ->setParent($parent) + ->setInstance($instance) + ->setInstanceId($instanceId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $instance_id + * Required. ID of the instance to be created. + * @type \Google\Cloud\SecureSourceManager\V1\Instance $instance + * Required. The resource being created. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. ID of the instance to be created. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstanceId() + { + return $this->instance_id; + } + + /** + * Required. ID of the instance to be created. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstanceId($var) + { + GPBUtil::checkString($var, True); + $this->instance_id = $var; + + return $this; + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecureSourceManager\V1\Instance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecureSourceManager\V1\Instance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\Instance::class); + $this->instance = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateIssueCommentRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateIssueCommentRequest.php new file mode 100644 index 000000000000..daab3eab2604 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateIssueCommentRequest.php @@ -0,0 +1,132 @@ +google.cloud.securesourcemanager.v1.CreateIssueCommentRequest + */ +class CreateIssueCommentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The issue in which to create the issue comment. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The issue comment to create. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.IssueComment issue_comment = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $issue_comment = null; + + /** + * @param string $parent Required. The issue in which to create the issue comment. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` + * Please see {@see SecureSourceManagerClient::issueName()} for help formatting this field. + * @param \Google\Cloud\SecureSourceManager\V1\IssueComment $issueComment Required. The issue comment to create. + * + * @return \Google\Cloud\SecureSourceManager\V1\CreateIssueCommentRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\SecureSourceManager\V1\IssueComment $issueComment): self + { + return (new self()) + ->setParent($parent) + ->setIssueComment($issueComment); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The issue in which to create the issue comment. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` + * @type \Google\Cloud\SecureSourceManager\V1\IssueComment $issue_comment + * Required. The issue comment to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The issue in which to create the issue comment. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The issue in which to create the issue comment. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The issue comment to create. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.IssueComment issue_comment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecureSourceManager\V1\IssueComment|null + */ + public function getIssueComment() + { + return $this->issue_comment; + } + + public function hasIssueComment() + { + return isset($this->issue_comment); + } + + public function clearIssueComment() + { + unset($this->issue_comment); + } + + /** + * Required. The issue comment to create. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.IssueComment issue_comment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecureSourceManager\V1\IssueComment $var + * @return $this + */ + public function setIssueComment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\IssueComment::class); + $this->issue_comment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateIssueRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateIssueRequest.php new file mode 100644 index 000000000000..9c9153ccad0c --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateIssueRequest.php @@ -0,0 +1,132 @@ +google.cloud.securesourcemanager.v1.CreateIssueRequest + */ +class CreateIssueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The repository in which to create the issue. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The issue to create. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Issue issue = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $issue = null; + + /** + * @param string $parent Required. The repository in which to create the issue. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + * Please see {@see SecureSourceManagerClient::repositoryName()} for help formatting this field. + * @param \Google\Cloud\SecureSourceManager\V1\Issue $issue Required. The issue to create. + * + * @return \Google\Cloud\SecureSourceManager\V1\CreateIssueRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\SecureSourceManager\V1\Issue $issue): self + { + return (new self()) + ->setParent($parent) + ->setIssue($issue); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The repository in which to create the issue. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + * @type \Google\Cloud\SecureSourceManager\V1\Issue $issue + * Required. The issue to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The repository in which to create the issue. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The repository in which to create the issue. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The issue to create. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Issue issue = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecureSourceManager\V1\Issue|null + */ + public function getIssue() + { + return $this->issue; + } + + public function hasIssue() + { + return isset($this->issue); + } + + public function clearIssue() + { + unset($this->issue); + } + + /** + * Required. The issue to create. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Issue issue = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecureSourceManager\V1\Issue $var + * @return $this + */ + public function setIssue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\Issue::class); + $this->issue = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreatePullRequestCommentRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreatePullRequestCommentRequest.php new file mode 100644 index 000000000000..5de02a5b7216 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreatePullRequestCommentRequest.php @@ -0,0 +1,137 @@ +google.cloud.securesourcemanager.v1.CreatePullRequestCommentRequest + */ +class CreatePullRequestCommentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * 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}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The pull request comment to create. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comment = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $pull_request_comment = null; + + /** + * @param string $parent 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}` + * Please see {@see SecureSourceManagerClient::pullRequestName()} for help formatting this field. + * @param \Google\Cloud\SecureSourceManager\V1\PullRequestComment $pullRequestComment Required. The pull request comment to create. + * + * @return \Google\Cloud\SecureSourceManager\V1\CreatePullRequestCommentRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\SecureSourceManager\V1\PullRequestComment $pullRequestComment): self + { + return (new self()) + ->setParent($parent) + ->setPullRequestComment($pullRequestComment); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * 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}` + * @type \Google\Cloud\SecureSourceManager\V1\PullRequestComment $pull_request_comment + * Required. The pull request comment to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * 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}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * 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}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The pull request comment to create. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecureSourceManager\V1\PullRequestComment|null + */ + public function getPullRequestComment() + { + return $this->pull_request_comment; + } + + public function hasPullRequestComment() + { + return isset($this->pull_request_comment); + } + + public function clearPullRequestComment() + { + unset($this->pull_request_comment); + } + + /** + * Required. The pull request comment to create. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecureSourceManager\V1\PullRequestComment $var + * @return $this + */ + public function setPullRequestComment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\PullRequestComment::class); + $this->pull_request_comment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreatePullRequestRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreatePullRequestRequest.php new file mode 100644 index 000000000000..7afcaf02ceb2 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreatePullRequestRequest.php @@ -0,0 +1,132 @@ +google.cloud.securesourcemanager.v1.CreatePullRequestRequest + */ +class CreatePullRequestRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The repository that the pull request is created from. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The pull request to create. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest pull_request = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $pull_request = null; + + /** + * @param string $parent Required. The repository that the pull request is created from. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + * Please see {@see SecureSourceManagerClient::repositoryName()} for help formatting this field. + * @param \Google\Cloud\SecureSourceManager\V1\PullRequest $pullRequest Required. The pull request to create. + * + * @return \Google\Cloud\SecureSourceManager\V1\CreatePullRequestRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\SecureSourceManager\V1\PullRequest $pullRequest): self + { + return (new self()) + ->setParent($parent) + ->setPullRequest($pullRequest); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The repository that the pull request is created from. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + * @type \Google\Cloud\SecureSourceManager\V1\PullRequest $pull_request + * Required. The pull request to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The repository that the pull request is created from. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The repository that the pull request is created from. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The pull request to create. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest pull_request = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecureSourceManager\V1\PullRequest|null + */ + public function getPullRequest() + { + return $this->pull_request; + } + + public function hasPullRequest() + { + return isset($this->pull_request); + } + + public function clearPullRequest() + { + unset($this->pull_request); + } + + /** + * Required. The pull request to create. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest pull_request = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecureSourceManager\V1\PullRequest $var + * @return $this + */ + public function setPullRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\PullRequest::class); + $this->pull_request = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateRepositoryRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateRepositoryRequest.php new file mode 100644 index 000000000000..30839f8f987d --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateRepositoryRequest.php @@ -0,0 +1,178 @@ +google.cloud.securesourcemanager.v1.CreateRepositoryRequest + */ +class CreateRepositoryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project in which to create the repository. Values are of the + * form `projects/{project_number}/locations/{location_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Repository repository = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $repository = null; + /** + * 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]-/. + * + * Generated from protobuf field string repository_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $repository_id = ''; + + /** + * @param string $parent Required. The project in which to create the repository. Values are of the + * form `projects/{project_number}/locations/{location_id}` + * Please see {@see SecureSourceManagerClient::locationName()} for help formatting this field. + * @param \Google\Cloud\SecureSourceManager\V1\Repository $repository Required. The resource being created. + * @param string $repositoryId 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]-/. + * + * @return \Google\Cloud\SecureSourceManager\V1\CreateRepositoryRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\SecureSourceManager\V1\Repository $repository, string $repositoryId): self + { + return (new self()) + ->setParent($parent) + ->setRepository($repository) + ->setRepositoryId($repositoryId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project in which to create the repository. Values are of the + * form `projects/{project_number}/locations/{location_id}` + * @type \Google\Cloud\SecureSourceManager\V1\Repository $repository + * Required. The resource being created. + * @type string $repository_id + * 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]-/. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project in which to create the repository. Values are of the + * form `projects/{project_number}/locations/{location_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project in which to create the repository. Values are of the + * form `projects/{project_number}/locations/{location_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Repository repository = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecureSourceManager\V1\Repository|null + */ + public function getRepository() + { + return $this->repository; + } + + public function hasRepository() + { + return isset($this->repository); + } + + public function clearRepository() + { + unset($this->repository); + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Repository repository = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecureSourceManager\V1\Repository $var + * @return $this + */ + public function setRepository($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\Repository::class); + $this->repository = $var; + + return $this; + } + + /** + * 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]-/. + * + * Generated from protobuf field string repository_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRepositoryId() + { + return $this->repository_id; + } + + /** + * 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]-/. + * + * Generated from protobuf field string repository_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRepositoryId($var) + { + GPBUtil::checkString($var, True); + $this->repository_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteBranchRuleRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteBranchRuleRequest.php new file mode 100644 index 000000000000..8cd06982e13f --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteBranchRuleRequest.php @@ -0,0 +1,111 @@ +google.cloud.securesourcemanager.v1.DeleteBranchRuleRequest + */ +class DeleteBranchRuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. If set to true, and the branch rule is not found, the request + * will succeed but no action will be taken on the server. + * + * Generated from protobuf field bool allow_missing = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $allow_missing = false; + + /** + * @param string $name Please see {@see SecureSourceManagerClient::branchRuleName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\DeleteBranchRuleRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * @type bool $allow_missing + * Optional. If set to true, and the branch rule is not found, the request + * will succeed but no action will be taken on the server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. If set to true, and the branch rule is not found, the request + * will succeed but no action will be taken on the server. + * + * Generated from protobuf field bool allow_missing = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * Optional. If set to true, and the branch rule is not found, the request + * will succeed but no action will be taken on the server. + * + * Generated from protobuf field bool allow_missing = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteHookRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteHookRequest.php new file mode 100644 index 000000000000..5707ceb6c0ed --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteHookRequest.php @@ -0,0 +1,91 @@ +google.cloud.securesourcemanager.v1.DeleteHookRequest + */ +class DeleteHookRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the hook to delete. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the hook to delete. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. Please see + * {@see SecureSourceManagerClient::hookName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\DeleteHookRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the hook to delete. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the hook to delete. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the hook to delete. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteInstanceRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteInstanceRequest.php new file mode 100644 index 000000000000..b4cd224f4619 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteInstanceRequest.php @@ -0,0 +1,189 @@ +google.cloud.securesourcemanager.v1.DeleteInstanceRequest + */ +class DeleteInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + /** + * Optional. If set to true, will force the deletion of the instance. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $force = false; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see SecureSourceManagerClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\DeleteInstanceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the resource. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $force + * Optional. If set to true, will force the deletion of the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. If set to true, will force the deletion of the instance. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Optional. If set to true, will force the deletion of the instance. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteIssueCommentRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteIssueCommentRequest.php new file mode 100644 index 000000000000..bf0817e8b4a2 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteIssueCommentRequest.php @@ -0,0 +1,91 @@ +google.cloud.securesourcemanager.v1.DeleteIssueCommentRequest + */ +class DeleteIssueCommentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * 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}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name 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}`. Please see + * {@see SecureSourceManagerClient::issueCommentName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\DeleteIssueCommentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * 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}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * 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}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * 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}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteIssueRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteIssueRequest.php new file mode 100644 index 000000000000..90509dc22bfa --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteIssueRequest.php @@ -0,0 +1,133 @@ +google.cloud.securesourcemanager.v1.DeleteIssueRequest + */ +class DeleteIssueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the issue to delete. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The current etag of the issue. + * If the etag is provided and does not match the current etag of the issue, + * deletion will be blocked and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + + /** + * @param string $name Required. Name of the issue to delete. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. Please see + * {@see SecureSourceManagerClient::issueName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\DeleteIssueRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the issue to delete. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + * @type string $etag + * Optional. The current etag of the issue. + * If the etag is provided and does not match the current etag of the issue, + * deletion will be blocked and an ABORTED error will be returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the issue to delete. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the issue to delete. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The current etag of the issue. + * If the etag is provided and does not match the current etag of the issue, + * deletion will be blocked and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. The current etag of the issue. + * If the etag is provided and does not match the current etag of the issue, + * deletion will be blocked and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeletePullRequestCommentRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeletePullRequestCommentRequest.php new file mode 100644 index 000000000000..0104dde1039e --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeletePullRequestCommentRequest.php @@ -0,0 +1,92 @@ +google.cloud.securesourcemanager.v1.DeletePullRequestCommentRequest + */ +class DeletePullRequestCommentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * 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}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name 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}`. Please see + * {@see SecureSourceManagerClient::pullRequestCommentName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\DeletePullRequestCommentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * 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}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * 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}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * 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}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteRepositoryRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteRepositoryRequest.php new file mode 100644 index 000000000000..7afb629ca645 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteRepositoryRequest.php @@ -0,0 +1,129 @@ +google.cloud.securesourcemanager.v1.DeleteRepositoryRequest + */ +class DeleteRepositoryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the repository to delete. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. If set to true, and the repository is not found, the request will + * succeed but no action will be taken on the server. + * + * Generated from protobuf field bool allow_missing = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $allow_missing = false; + + /** + * @param string $name Required. Name of the repository to delete. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. Please see + * {@see SecureSourceManagerClient::repositoryName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\DeleteRepositoryRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the repository to delete. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + * @type bool $allow_missing + * Optional. If set to true, and the repository is not found, the request will + * succeed but no action will be taken on the server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the repository to delete. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the repository to delete. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. If set to true, and the repository is not found, the request will + * succeed but no action will be taken on the server. + * + * Generated from protobuf field bool allow_missing = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * Optional. If set to true, and the repository is not found, the request will + * succeed but no action will be taken on the server. + * + * Generated from protobuf field bool allow_missing = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchBlobRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchBlobRequest.php new file mode 100644 index 000000000000..9a3ae623b85b --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchBlobRequest.php @@ -0,0 +1,109 @@ +google.cloud.securesourcemanager.v1.FetchBlobRequest + */ +class FetchBlobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + * Specifies the repository containing the blob. + * + * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $repository = ''; + /** + * Required. The SHA-1 hash of the blob to retrieve. + * + * Generated from protobuf field string sha = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $sha = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $repository + * Required. The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + * Specifies the repository containing the blob. + * @type string $sha + * Required. The SHA-1 hash of the blob to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + * Specifies the repository containing the blob. + * + * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getRepository() + { + return $this->repository; + } + + /** + * Required. The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + * Specifies the repository containing the blob. + * + * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRepository($var) + { + GPBUtil::checkString($var, True); + $this->repository = $var; + + return $this; + } + + /** + * Required. The SHA-1 hash of the blob to retrieve. + * + * Generated from protobuf field string sha = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSha() + { + return $this->sha; + } + + /** + * Required. The SHA-1 hash of the blob to retrieve. + * + * Generated from protobuf field string sha = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSha($var) + { + GPBUtil::checkString($var, True); + $this->sha = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchBlobResponse.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchBlobResponse.php new file mode 100644 index 000000000000..8f42b13e096a --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchBlobResponse.php @@ -0,0 +1,101 @@ +google.cloud.securesourcemanager.v1.FetchBlobResponse + */ +class FetchBlobResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The SHA-1 hash of the blob. + * + * Generated from protobuf field string sha = 1; + */ + protected $sha = ''; + /** + * The content of the blob, encoded as base64. + * + * Generated from protobuf field string content = 2; + */ + protected $content = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $sha + * The SHA-1 hash of the blob. + * @type string $content + * The content of the blob, encoded as base64. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * The SHA-1 hash of the blob. + * + * Generated from protobuf field string sha = 1; + * @return string + */ + public function getSha() + { + return $this->sha; + } + + /** + * The SHA-1 hash of the blob. + * + * Generated from protobuf field string sha = 1; + * @param string $var + * @return $this + */ + public function setSha($var) + { + GPBUtil::checkString($var, True); + $this->sha = $var; + + return $this; + } + + /** + * The content of the blob, encoded as base64. + * + * Generated from protobuf field string content = 2; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * The content of the blob, encoded as base64. + * + * Generated from protobuf field string content = 2; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, True); + $this->content = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchTreeRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchTreeRequest.php new file mode 100644 index 000000000000..1411234c634c --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchTreeRequest.php @@ -0,0 +1,223 @@ +google.cloud.securesourcemanager.v1.FetchTreeRequest + */ +class FetchTreeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + * Specifies the repository to fetch the tree from. + * + * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $repository = ''; + /** + * Optional. `ref` can be a SHA-1 hash, a branch name, or a tag. Specifies + * which tree to fetch. If not specified, the default branch will be used. + * + * Generated from protobuf field string ref = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ref = ''; + /** + * Optional. If true, include all subfolders and their files in the response. + * If false, only the immediate children are returned. + * + * Generated from protobuf field bool recursive = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $recursive = false; + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, at most 10,000 items will be returned. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $repository + * Required. The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + * Specifies the repository to fetch the tree from. + * @type string $ref + * Optional. `ref` can be a SHA-1 hash, a branch name, or a tag. Specifies + * which tree to fetch. If not specified, the default branch will be used. + * @type bool $recursive + * Optional. If true, include all subfolders and their files in the response. + * If false, only the immediate children are returned. + * @type int $page_size + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, at most 10,000 items will be returned. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + * Specifies the repository to fetch the tree from. + * + * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getRepository() + { + return $this->repository; + } + + /** + * Required. The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + * Specifies the repository to fetch the tree from. + * + * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRepository($var) + { + GPBUtil::checkString($var, True); + $this->repository = $var; + + return $this; + } + + /** + * Optional. `ref` can be a SHA-1 hash, a branch name, or a tag. Specifies + * which tree to fetch. If not specified, the default branch will be used. + * + * Generated from protobuf field string ref = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRef() + { + return $this->ref; + } + + /** + * Optional. `ref` can be a SHA-1 hash, a branch name, or a tag. Specifies + * which tree to fetch. If not specified, the default branch will be used. + * + * Generated from protobuf field string ref = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRef($var) + { + GPBUtil::checkString($var, True); + $this->ref = $var; + + return $this; + } + + /** + * Optional. If true, include all subfolders and their files in the response. + * If false, only the immediate children are returned. + * + * Generated from protobuf field bool recursive = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getRecursive() + { + return $this->recursive; + } + + /** + * Optional. If true, include all subfolders and their files in the response. + * If false, only the immediate children are returned. + * + * Generated from protobuf field bool recursive = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setRecursive($var) + { + GPBUtil::checkBool($var); + $this->recursive = $var; + + return $this; + } + + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, at most 10,000 items will be returned. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, at most 10,000 items will be returned. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchTreeResponse.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchTreeResponse.php new file mode 100644 index 000000000000..6d5f552e4e51 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchTreeResponse.php @@ -0,0 +1,101 @@ +google.cloud.securesourcemanager.v1.FetchTreeResponse + */ +class FetchTreeResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of TreeEntry objects. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.TreeEntry tree_entries = 1; + */ + private $tree_entries; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecureSourceManager\V1\TreeEntry[] $tree_entries + * The list of TreeEntry objects. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * The list of TreeEntry objects. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.TreeEntry tree_entries = 1; + * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\TreeEntry> + */ + public function getTreeEntries() + { + return $this->tree_entries; + } + + /** + * The list of TreeEntry objects. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.TreeEntry tree_entries = 1; + * @param \Google\Cloud\SecureSourceManager\V1\TreeEntry[] $var + * @return $this + */ + public function setTreeEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\TreeEntry::class); + $this->tree_entries = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FileDiff.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FileDiff.php new file mode 100644 index 000000000000..6bfd025fd97c --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FileDiff.php @@ -0,0 +1,170 @@ +google.cloud.securesourcemanager.v1.FileDiff + */ +class FileDiff extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the file. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The action taken on the file (eg. added, modified, deleted). + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.FileDiff.Action action = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $action = 0; + /** + * Output only. The commit pointing to the file changes. + * + * Generated from protobuf field string sha = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $sha = ''; + /** + * Output only. The git patch containing the file changes. + * + * Generated from protobuf field string patch = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $patch = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of the file. + * @type int $action + * Output only. The action taken on the file (eg. added, modified, deleted). + * @type string $sha + * Output only. The commit pointing to the file changes. + * @type string $patch + * Output only. The git patch containing the file changes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the file. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the file. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The action taken on the file (eg. added, modified, deleted). + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.FileDiff.Action action = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getAction() + { + return $this->action; + } + + /** + * Output only. The action taken on the file (eg. added, modified, deleted). + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.FileDiff.Action action = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecureSourceManager\V1\FileDiff\Action::class); + $this->action = $var; + + return $this; + } + + /** + * Output only. The commit pointing to the file changes. + * + * Generated from protobuf field string sha = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSha() + { + return $this->sha; + } + + /** + * Output only. The commit pointing to the file changes. + * + * Generated from protobuf field string sha = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSha($var) + { + GPBUtil::checkString($var, True); + $this->sha = $var; + + return $this; + } + + /** + * Output only. The git patch containing the file changes. + * + * Generated from protobuf field string patch = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPatch() + { + return $this->patch; + } + + /** + * Output only. The git patch containing the file changes. + * + * Generated from protobuf field string patch = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPatch($var) + { + GPBUtil::checkString($var, True); + $this->patch = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FileDiff/Action.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FileDiff/Action.php new file mode 100644 index 000000000000..0c6dc74c2fc9 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FileDiff/Action.php @@ -0,0 +1,68 @@ +google.cloud.securesourcemanager.v1.FileDiff.Action + */ +class Action +{ + /** + * Unspecified. + * + * Generated from protobuf enum ACTION_UNSPECIFIED = 0; + */ + const ACTION_UNSPECIFIED = 0; + /** + * The file was added. + * + * Generated from protobuf enum ADDED = 1; + */ + const ADDED = 1; + /** + * The file was modified. + * + * Generated from protobuf enum MODIFIED = 2; + */ + const MODIFIED = 2; + /** + * The file was deleted. + * + * Generated from protobuf enum DELETED = 3; + */ + const DELETED = 3; + + private static $valueToName = [ + self::ACTION_UNSPECIFIED => 'ACTION_UNSPECIFIED', + self::ADDED => 'ADDED', + self::MODIFIED => 'MODIFIED', + self::DELETED => 'DELETED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetBranchRuleRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetBranchRuleRequest.php new file mode 100644 index 000000000000..850491f2650f --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetBranchRuleRequest.php @@ -0,0 +1,91 @@ +google.cloud.securesourcemanager.v1.GetBranchRuleRequest + */ +class GetBranchRuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the repository to retrieve. + * The format is + * `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the repository to retrieve. + * The format is + * `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`. Please see + * {@see SecureSourceManagerClient::branchRuleName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\GetBranchRuleRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the repository to retrieve. + * The format is + * `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the repository to retrieve. + * The format is + * `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the repository to retrieve. + * The format is + * `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetHookRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetHookRequest.php new file mode 100644 index 000000000000..1e8fe50045ee --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetHookRequest.php @@ -0,0 +1,91 @@ +google.cloud.securesourcemanager.v1.GetHookRequest + */ +class GetHookRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the hook to retrieve. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the hook to retrieve. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. Please see + * {@see SecureSourceManagerClient::hookName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\GetHookRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the hook to retrieve. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the hook to retrieve. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the hook to retrieve. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetInstanceRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetInstanceRequest.php new file mode 100644 index 000000000000..4c2a38ea220c --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetInstanceRequest.php @@ -0,0 +1,81 @@ +google.cloud.securesourcemanager.v1.GetInstanceRequest + */ +class GetInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see SecureSourceManagerClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\GetInstanceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetIssueCommentRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetIssueCommentRequest.php new file mode 100644 index 000000000000..a3cb3412980b --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetIssueCommentRequest.php @@ -0,0 +1,91 @@ +google.cloud.securesourcemanager.v1.GetIssueCommentRequest + */ +class GetIssueCommentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the issue comment to retrieve. + * The format is + * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}/issueComments/{comment_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the issue comment to retrieve. + * The format is + * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}/issueComments/{comment_id}`. Please see + * {@see SecureSourceManagerClient::issueCommentName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\GetIssueCommentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the issue comment to retrieve. + * The format is + * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}/issueComments/{comment_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the issue comment to retrieve. + * The format is + * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}/issueComments/{comment_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the issue comment to retrieve. + * The format is + * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}/issueComments/{comment_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetIssueRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetIssueRequest.php new file mode 100644 index 000000000000..8725cf159035 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetIssueRequest.php @@ -0,0 +1,91 @@ +google.cloud.securesourcemanager.v1.GetIssueRequest + */ +class GetIssueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the issue to retrieve. + * The format is + * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the issue to retrieve. + * The format is + * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}`. Please see + * {@see SecureSourceManagerClient::issueName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\GetIssueRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the issue to retrieve. + * The format is + * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the issue to retrieve. + * The format is + * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the issue to retrieve. + * The format is + * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetPullRequestCommentRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetPullRequestCommentRequest.php new file mode 100644 index 000000000000..0db3479658d6 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetPullRequestCommentRequest.php @@ -0,0 +1,91 @@ +google.cloud.securesourcemanager.v1.GetPullRequestCommentRequest + */ +class GetPullRequestCommentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * 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}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name 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}`. Please see + * {@see SecureSourceManagerClient::pullRequestCommentName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\GetPullRequestCommentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * 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}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * 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}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * 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}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetPullRequestRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetPullRequestRequest.php new file mode 100644 index 000000000000..6a3b98624553 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetPullRequestRequest.php @@ -0,0 +1,91 @@ +google.cloud.securesourcemanager.v1.GetPullRequestRequest + */ +class GetPullRequestRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the pull request to retrieve. + * The format is + * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the pull request to retrieve. + * The format is + * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}`. Please see + * {@see SecureSourceManagerClient::pullRequestName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\GetPullRequestRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the pull request to retrieve. + * The format is + * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the pull request to retrieve. + * The format is + * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the pull request to retrieve. + * The format is + * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetRepositoryRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetRepositoryRequest.php new file mode 100644 index 000000000000..440bda89768b --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetRepositoryRequest.php @@ -0,0 +1,91 @@ +google.cloud.securesourcemanager.v1.GetRepositoryRequest + */ +class GetRepositoryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the repository to retrieve. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the repository to retrieve. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. Please see + * {@see SecureSourceManagerClient::repositoryName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\GetRepositoryRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the repository to retrieve. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the repository to retrieve. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the repository to retrieve. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Hook.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Hook.php new file mode 100644 index 000000000000..e18abfdb8fda --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Hook.php @@ -0,0 +1,381 @@ +google.cloud.securesourcemanager.v1.Hook + */ +class Hook extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. A unique identifier for a Hook. The name should be of the + * format: + * `projects/{project}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. The target URI to which the payloads will be delivered. + * + * Generated from protobuf field string target_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $target_uri = ''; + /** + * Optional. Determines if the hook disabled or not. + * Set to true to stop sending traffic. + * + * Generated from protobuf field bool disabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $disabled = false; + /** + * Optional. The events that trigger hook on. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Hook.HookEventType events = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $events; + /** + * Output only. Create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. Unique identifier of the hook. + * + * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + */ + protected $uid = ''; + /** + * Optional. The trigger option for push events. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Hook.PushOption push_option = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $push_option = null; + /** + * Optional. The sensitive query string to be appended to the target URI. + * + * Generated from protobuf field string sensitive_query_string = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sensitive_query_string = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. A unique identifier for a Hook. The name should be of the + * format: + * `projects/{project}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}` + * @type string $target_uri + * Required. The target URI to which the payloads will be delivered. + * @type bool $disabled + * Optional. Determines if the hook disabled or not. + * Set to true to stop sending traffic. + * @type int[] $events + * Optional. The events that trigger hook on. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Create timestamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Update timestamp. + * @type string $uid + * Output only. Unique identifier of the hook. + * @type \Google\Cloud\SecureSourceManager\V1\Hook\PushOption $push_option + * Optional. The trigger option for push events. + * @type string $sensitive_query_string + * Optional. The sensitive query string to be appended to the target URI. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. A unique identifier for a Hook. The name should be of the + * format: + * `projects/{project}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. A unique identifier for a Hook. The name should be of the + * format: + * `projects/{project}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The target URI to which the payloads will be delivered. + * + * Generated from protobuf field string target_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTargetUri() + { + return $this->target_uri; + } + + /** + * Required. The target URI to which the payloads will be delivered. + * + * Generated from protobuf field string target_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTargetUri($var) + { + GPBUtil::checkString($var, True); + $this->target_uri = $var; + + return $this; + } + + /** + * Optional. Determines if the hook disabled or not. + * Set to true to stop sending traffic. + * + * Generated from protobuf field bool disabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getDisabled() + { + return $this->disabled; + } + + /** + * Optional. Determines if the hook disabled or not. + * Set to true to stop sending traffic. + * + * Generated from protobuf field bool disabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setDisabled($var) + { + GPBUtil::checkBool($var); + $this->disabled = $var; + + return $this; + } + + /** + * Optional. The events that trigger hook on. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Hook.HookEventType events = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getEvents() + { + return $this->events; + } + + /** + * Optional. The events that trigger hook on. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Hook.HookEventType events = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int[] $var + * @return $this + */ + public function setEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\SecureSourceManager\V1\Hook\HookEventType::class); + $this->events = $arr; + + return $this; + } + + /** + * Output only. Create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. Unique identifier of the hook. + * + * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. Unique identifier of the hook. + * + * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Optional. The trigger option for push events. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Hook.PushOption push_option = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SecureSourceManager\V1\Hook\PushOption|null + */ + public function getPushOption() + { + return $this->push_option; + } + + public function hasPushOption() + { + return isset($this->push_option); + } + + public function clearPushOption() + { + unset($this->push_option); + } + + /** + * Optional. The trigger option for push events. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Hook.PushOption push_option = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SecureSourceManager\V1\Hook\PushOption $var + * @return $this + */ + public function setPushOption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\Hook\PushOption::class); + $this->push_option = $var; + + return $this; + } + + /** + * Optional. The sensitive query string to be appended to the target URI. + * + * Generated from protobuf field string sensitive_query_string = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSensitiveQueryString() + { + return $this->sensitive_query_string; + } + + /** + * Optional. The sensitive query string to be appended to the target URI. + * + * Generated from protobuf field string sensitive_query_string = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSensitiveQueryString($var) + { + GPBUtil::checkString($var, True); + $this->sensitive_query_string = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Hook/HookEventType.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Hook/HookEventType.php new file mode 100644 index 000000000000..a805886aa824 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Hook/HookEventType.php @@ -0,0 +1,60 @@ +google.cloud.securesourcemanager.v1.Hook.HookEventType + */ +class HookEventType +{ + /** + * Unspecified. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * Push events are triggered when pushing to the repository. + * + * Generated from protobuf enum PUSH = 1; + */ + const PUSH = 1; + /** + * Pull request events are triggered when a pull request is opened, closed, + * reopened, or edited. + * + * Generated from protobuf enum PULL_REQUEST = 2; + */ + const PULL_REQUEST = 2; + + private static $valueToName = [ + self::UNSPECIFIED => 'UNSPECIFIED', + self::PUSH => 'PUSH', + self::PULL_REQUEST => 'PULL_REQUEST', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Hook/PushOption.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Hook/PushOption.php new file mode 100644 index 000000000000..7785a28b0d96 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Hook/PushOption.php @@ -0,0 +1,77 @@ +google.cloud.securesourcemanager.v1.Hook.PushOption + */ +class PushOption extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Trigger hook for matching branches only. + * Specified as glob pattern. If empty or *, events for all branches are + * reported. Examples: main, {main,release*}. + * See https://pkg.go.dev/github.com/gobwas/glob documentation. + * + * Generated from protobuf field string branch_filter = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $branch_filter = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $branch_filter + * Optional. Trigger hook for matching branches only. + * Specified as glob pattern. If empty or *, events for all branches are + * reported. Examples: main, {main,release*}. + * See https://pkg.go.dev/github.com/gobwas/glob documentation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Trigger hook for matching branches only. + * Specified as glob pattern. If empty or *, events for all branches are + * reported. Examples: main, {main,release*}. + * See https://pkg.go.dev/github.com/gobwas/glob documentation. + * + * Generated from protobuf field string branch_filter = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getBranchFilter() + { + return $this->branch_filter; + } + + /** + * Optional. Trigger hook for matching branches only. + * Specified as glob pattern. If empty or *, events for all branches are + * reported. Examples: main, {main,release*}. + * See https://pkg.go.dev/github.com/gobwas/glob documentation. + * + * Generated from protobuf field string branch_filter = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setBranchFilter($var) + { + GPBUtil::checkString($var, True); + $this->branch_filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance.php new file mode 100644 index 000000000000..a5310a8becd3 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance.php @@ -0,0 +1,483 @@ +google.cloud.securesourcemanager.v1.Instance + */ +class Instance extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. A unique identifier for an instance. The name should be of the + * format: + * `projects/{project_number}/locations/{location_id}/instances/{instance_id}` + * `project_number`: Maps to a unique int64 id assigned to each project. + * `location_id`: Refers to the region where the instance will be deployed. + * Since Secure Source Manager is a regional service, it must be one of the + * valid GCP regions. + * `instance_id`: User provided name for the instance, must be unique for a + * project_number and location_id combination. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Labels as key value pairs. + * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/best-practices-labels#label_encoding). + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Private settings for private instance. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.PrivateConfig private_config = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $private_config = null; + /** + * Output only. Current state of the instance. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. An optional field providing information about the current + * instance state. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.StateNote state_note = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_note = 0; + /** + * Optional. Immutable. Customer-managed encryption key name, in the format + * projects/{@*}locations/{@*}keyRings/{@*}cryptoKeys/*. + * + * Generated from protobuf field string kms_key = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $kms_key = ''; + /** + * Output only. A list of hostnames for this instance. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.HostConfig host_config = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $host_config = null; + /** + * Optional. Configuration for Workforce Identity Federation to support + * third party identity provider. If unset, defaults to the Google OIDC IdP. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.WorkforceIdentityFederationConfig workforce_identity_federation_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $workforce_identity_federation_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. A unique identifier for an instance. The name should be of the + * format: + * `projects/{project_number}/locations/{location_id}/instances/{instance_id}` + * `project_number`: Maps to a unique int64 id assigned to each project. + * `location_id`: Refers to the region where the instance will be deployed. + * Since Secure Source Manager is a regional service, it must be one of the + * valid GCP regions. + * `instance_id`: User provided name for the instance, must be unique for a + * project_number and location_id combination. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Create timestamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Update timestamp. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels as key value pairs. + * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/best-practices-labels#label_encoding). + * @type \Google\Cloud\SecureSourceManager\V1\Instance\PrivateConfig $private_config + * Optional. Private settings for private instance. + * @type int $state + * Output only. Current state of the instance. + * @type int $state_note + * Output only. An optional field providing information about the current + * instance state. + * @type string $kms_key + * Optional. Immutable. Customer-managed encryption key name, in the format + * projects/{@*}locations/{@*}keyRings/{@*}cryptoKeys/*. + * @type \Google\Cloud\SecureSourceManager\V1\Instance\HostConfig $host_config + * Output only. A list of hostnames for this instance. + * @type \Google\Cloud\SecureSourceManager\V1\Instance\WorkforceIdentityFederationConfig $workforce_identity_federation_config + * Optional. Configuration for Workforce Identity Federation to support + * third party identity provider. If unset, defaults to the Google OIDC IdP. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. A unique identifier for an instance. The name should be of the + * format: + * `projects/{project_number}/locations/{location_id}/instances/{instance_id}` + * `project_number`: Maps to a unique int64 id assigned to each project. + * `location_id`: Refers to the region where the instance will be deployed. + * Since Secure Source Manager is a regional service, it must be one of the + * valid GCP regions. + * `instance_id`: User provided name for the instance, must be unique for a + * project_number and location_id combination. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. A unique identifier for an instance. The name should be of the + * format: + * `projects/{project_number}/locations/{location_id}/instances/{instance_id}` + * `project_number`: Maps to a unique int64 id assigned to each project. + * `location_id`: Refers to the region where the instance will be deployed. + * Since Secure Source Manager is a regional service, it must be one of the + * valid GCP regions. + * `instance_id`: User provided name for the instance, must be unique for a + * project_number and location_id combination. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional. Labels as key value pairs. + * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/best-practices-labels#label_encoding). + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels as key value pairs. + * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/best-practices-labels#label_encoding). + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. Private settings for private instance. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.PrivateConfig private_config = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SecureSourceManager\V1\Instance\PrivateConfig|null + */ + public function getPrivateConfig() + { + return $this->private_config; + } + + public function hasPrivateConfig() + { + return isset($this->private_config); + } + + public function clearPrivateConfig() + { + unset($this->private_config); + } + + /** + * Optional. Private settings for private instance. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.PrivateConfig private_config = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SecureSourceManager\V1\Instance\PrivateConfig $var + * @return $this + */ + public function setPrivateConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\Instance\PrivateConfig::class); + $this->private_config = $var; + + return $this; + } + + /** + * Output only. Current state of the instance. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state of the instance. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecureSourceManager\V1\Instance\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. An optional field providing information about the current + * instance state. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.StateNote state_note = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getStateNote() + { + return $this->state_note; + } + + /** + * Output only. An optional field providing information about the current + * instance state. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.StateNote state_note = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setStateNote($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecureSourceManager\V1\Instance\StateNote::class); + $this->state_note = $var; + + return $this; + } + + /** + * Optional. Immutable. Customer-managed encryption key name, in the format + * projects/{@*}locations/{@*}keyRings/{@*}cryptoKeys/*. + * + * Generated from protobuf field string kms_key = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getKmsKey() + { + return $this->kms_key; + } + + /** + * Optional. Immutable. Customer-managed encryption key name, in the format + * projects/{@*}locations/{@*}keyRings/{@*}cryptoKeys/*. + * + * Generated from protobuf field string kms_key = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setKmsKey($var) + { + GPBUtil::checkString($var, True); + $this->kms_key = $var; + + return $this; + } + + /** + * Output only. A list of hostnames for this instance. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.HostConfig host_config = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\SecureSourceManager\V1\Instance\HostConfig|null + */ + public function getHostConfig() + { + return $this->host_config; + } + + public function hasHostConfig() + { + return isset($this->host_config); + } + + public function clearHostConfig() + { + unset($this->host_config); + } + + /** + * Output only. A list of hostnames for this instance. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.HostConfig host_config = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\SecureSourceManager\V1\Instance\HostConfig $var + * @return $this + */ + public function setHostConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\Instance\HostConfig::class); + $this->host_config = $var; + + return $this; + } + + /** + * Optional. Configuration for Workforce Identity Federation to support + * third party identity provider. If unset, defaults to the Google OIDC IdP. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.WorkforceIdentityFederationConfig workforce_identity_federation_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SecureSourceManager\V1\Instance\WorkforceIdentityFederationConfig|null + */ + public function getWorkforceIdentityFederationConfig() + { + return $this->workforce_identity_federation_config; + } + + public function hasWorkforceIdentityFederationConfig() + { + return isset($this->workforce_identity_federation_config); + } + + public function clearWorkforceIdentityFederationConfig() + { + unset($this->workforce_identity_federation_config); + } + + /** + * Optional. Configuration for Workforce Identity Federation to support + * third party identity provider. If unset, defaults to the Google OIDC IdP. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.WorkforceIdentityFederationConfig workforce_identity_federation_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SecureSourceManager\V1\Instance\WorkforceIdentityFederationConfig $var + * @return $this + */ + public function setWorkforceIdentityFederationConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\Instance\WorkforceIdentityFederationConfig::class); + $this->workforce_identity_federation_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/HostConfig.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/HostConfig.php new file mode 100644 index 000000000000..8d4f866b4210 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/HostConfig.php @@ -0,0 +1,169 @@ +google.cloud.securesourcemanager.v1.Instance.HostConfig + */ +class HostConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. HTML hostname. + * + * Generated from protobuf field string html = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $html = ''; + /** + * Output only. API hostname. + * + * Generated from protobuf field string api = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api = ''; + /** + * Output only. Git HTTP hostname. + * + * Generated from protobuf field string git_http = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $git_http = ''; + /** + * Output only. Git SSH hostname. + * + * Generated from protobuf field string git_ssh = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $git_ssh = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $html + * Output only. HTML hostname. + * @type string $api + * Output only. API hostname. + * @type string $git_http + * Output only. Git HTTP hostname. + * @type string $git_ssh + * Output only. Git SSH hostname. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Output only. HTML hostname. + * + * Generated from protobuf field string html = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getHtml() + { + return $this->html; + } + + /** + * Output only. HTML hostname. + * + * Generated from protobuf field string html = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setHtml($var) + { + GPBUtil::checkString($var, True); + $this->html = $var; + + return $this; + } + + /** + * Output only. API hostname. + * + * Generated from protobuf field string api = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApi() + { + return $this->api; + } + + /** + * Output only. API hostname. + * + * Generated from protobuf field string api = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApi($var) + { + GPBUtil::checkString($var, True); + $this->api = $var; + + return $this; + } + + /** + * Output only. Git HTTP hostname. + * + * Generated from protobuf field string git_http = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getGitHttp() + { + return $this->git_http; + } + + /** + * Output only. Git HTTP hostname. + * + * Generated from protobuf field string git_http = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setGitHttp($var) + { + GPBUtil::checkString($var, True); + $this->git_http = $var; + + return $this; + } + + /** + * Output only. Git SSH hostname. + * + * Generated from protobuf field string git_ssh = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getGitSsh() + { + return $this->git_ssh; + } + + /** + * Output only. Git SSH hostname. + * + * Generated from protobuf field string git_ssh = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setGitSsh($var) + { + GPBUtil::checkString($var, True); + $this->git_ssh = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/PrivateConfig.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/PrivateConfig.php new file mode 100644 index 000000000000..d9216a90aa6e --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/PrivateConfig.php @@ -0,0 +1,267 @@ +google.cloud.securesourcemanager.v1.Instance.PrivateConfig + */ +class PrivateConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Immutable. Indicate if it's private instance. + * + * Generated from protobuf field bool is_private = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + */ + protected $is_private = false; + /** + * Optional. Immutable. CA pool resource, resource must in the format of + * `projects/{project}/locations/{location}/caPools/{ca_pool}`. + * + * Generated from protobuf field string ca_pool = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $ca_pool = ''; + /** + * Output only. Service Attachment for HTTP, resource is in the format of + * `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`. + * + * Generated from protobuf field string http_service_attachment = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $http_service_attachment = ''; + /** + * Output only. Service Attachment for SSH, resource is in the format of + * `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`. + * + * Generated from protobuf field string ssh_service_attachment = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $ssh_service_attachment = ''; + /** + * Optional. Additional allowed projects for setting up PSC connections. + * Instance host project is automatically allowed and does not need to be + * included in this list. + * + * Generated from protobuf field repeated string psc_allowed_projects = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $psc_allowed_projects; + /** + * Optional. Custom host config for the instance. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.PrivateConfig.CustomHostConfig custom_host_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $custom_host_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $is_private + * Required. Immutable. Indicate if it's private instance. + * @type string $ca_pool + * Optional. Immutable. CA pool resource, resource must in the format of + * `projects/{project}/locations/{location}/caPools/{ca_pool}`. + * @type string $http_service_attachment + * Output only. Service Attachment for HTTP, resource is in the format of + * `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`. + * @type string $ssh_service_attachment + * Output only. Service Attachment for SSH, resource is in the format of + * `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`. + * @type string[] $psc_allowed_projects + * Optional. Additional allowed projects for setting up PSC connections. + * Instance host project is automatically allowed and does not need to be + * included in this list. + * @type \Google\Cloud\SecureSourceManager\V1\Instance\PrivateConfig\CustomHostConfig $custom_host_config + * Optional. Custom host config for the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Immutable. Indicate if it's private instance. + * + * Generated from protobuf field bool is_private = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * @return bool + */ + public function getIsPrivate() + { + return $this->is_private; + } + + /** + * Required. Immutable. Indicate if it's private instance. + * + * Generated from protobuf field bool is_private = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * @param bool $var + * @return $this + */ + public function setIsPrivate($var) + { + GPBUtil::checkBool($var); + $this->is_private = $var; + + return $this; + } + + /** + * Optional. Immutable. CA pool resource, resource must in the format of + * `projects/{project}/locations/{location}/caPools/{ca_pool}`. + * + * Generated from protobuf field string ca_pool = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getCaPool() + { + return $this->ca_pool; + } + + /** + * Optional. Immutable. CA pool resource, resource must in the format of + * `projects/{project}/locations/{location}/caPools/{ca_pool}`. + * + * Generated from protobuf field string ca_pool = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCaPool($var) + { + GPBUtil::checkString($var, True); + $this->ca_pool = $var; + + return $this; + } + + /** + * Output only. Service Attachment for HTTP, resource is in the format of + * `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`. + * + * Generated from protobuf field string http_service_attachment = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getHttpServiceAttachment() + { + return $this->http_service_attachment; + } + + /** + * Output only. Service Attachment for HTTP, resource is in the format of + * `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`. + * + * Generated from protobuf field string http_service_attachment = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setHttpServiceAttachment($var) + { + GPBUtil::checkString($var, True); + $this->http_service_attachment = $var; + + return $this; + } + + /** + * Output only. Service Attachment for SSH, resource is in the format of + * `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`. + * + * Generated from protobuf field string ssh_service_attachment = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getSshServiceAttachment() + { + return $this->ssh_service_attachment; + } + + /** + * Output only. Service Attachment for SSH, resource is in the format of + * `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`. + * + * Generated from protobuf field string ssh_service_attachment = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSshServiceAttachment($var) + { + GPBUtil::checkString($var, True); + $this->ssh_service_attachment = $var; + + return $this; + } + + /** + * Optional. Additional allowed projects for setting up PSC connections. + * Instance host project is automatically allowed and does not need to be + * included in this list. + * + * Generated from protobuf field repeated string psc_allowed_projects = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getPscAllowedProjects() + { + return $this->psc_allowed_projects; + } + + /** + * Optional. Additional allowed projects for setting up PSC connections. + * Instance host project is automatically allowed and does not need to be + * included in this list. + * + * Generated from protobuf field repeated string psc_allowed_projects = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string[] $var + * @return $this + */ + public function setPscAllowedProjects($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->psc_allowed_projects = $arr; + + return $this; + } + + /** + * Optional. Custom host config for the instance. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.PrivateConfig.CustomHostConfig custom_host_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SecureSourceManager\V1\Instance\PrivateConfig\CustomHostConfig|null + */ + public function getCustomHostConfig() + { + return $this->custom_host_config; + } + + public function hasCustomHostConfig() + { + return isset($this->custom_host_config); + } + + public function clearCustomHostConfig() + { + unset($this->custom_host_config); + } + + /** + * Optional. Custom host config for the instance. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.PrivateConfig.CustomHostConfig custom_host_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SecureSourceManager\V1\Instance\PrivateConfig\CustomHostConfig $var + * @return $this + */ + public function setCustomHostConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\Instance\PrivateConfig\CustomHostConfig::class); + $this->custom_host_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/PrivateConfig/CustomHostConfig.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/PrivateConfig/CustomHostConfig.php new file mode 100644 index 000000000000..e073e3ba2faa --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/PrivateConfig/CustomHostConfig.php @@ -0,0 +1,185 @@ +google.cloud.securesourcemanager.v1.Instance.PrivateConfig.CustomHostConfig + */ +class CustomHostConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The custom UI hostname for the instance, e.g., + * "git.source.internal.mycompany.com" + * + * Generated from protobuf field string html = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $html = ''; + /** + * Required. The custom API hostname for the instance, e.g., + * "api.source.internal.mycompany.com" + * + * Generated from protobuf field string api = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $api = ''; + /** + * Required. The custom git ssh hostname for the instance, e.g., + * "ssh.source.internal.mycompany.com" + * + * Generated from protobuf field string git_ssh = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $git_ssh = ''; + /** + * Required. The custom git http hostname for the instance, e.g., + * "git.source.internal.mycompany.com" + * + * Generated from protobuf field string git_http = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $git_http = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $html + * Required. The custom UI hostname for the instance, e.g., + * "git.source.internal.mycompany.com" + * @type string $api + * Required. The custom API hostname for the instance, e.g., + * "api.source.internal.mycompany.com" + * @type string $git_ssh + * Required. The custom git ssh hostname for the instance, e.g., + * "ssh.source.internal.mycompany.com" + * @type string $git_http + * Required. The custom git http hostname for the instance, e.g., + * "git.source.internal.mycompany.com" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The custom UI hostname for the instance, e.g., + * "git.source.internal.mycompany.com" + * + * Generated from protobuf field string html = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getHtml() + { + return $this->html; + } + + /** + * Required. The custom UI hostname for the instance, e.g., + * "git.source.internal.mycompany.com" + * + * Generated from protobuf field string html = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setHtml($var) + { + GPBUtil::checkString($var, True); + $this->html = $var; + + return $this; + } + + /** + * Required. The custom API hostname for the instance, e.g., + * "api.source.internal.mycompany.com" + * + * Generated from protobuf field string api = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getApi() + { + return $this->api; + } + + /** + * Required. The custom API hostname for the instance, e.g., + * "api.source.internal.mycompany.com" + * + * Generated from protobuf field string api = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setApi($var) + { + GPBUtil::checkString($var, True); + $this->api = $var; + + return $this; + } + + /** + * Required. The custom git ssh hostname for the instance, e.g., + * "ssh.source.internal.mycompany.com" + * + * Generated from protobuf field string git_ssh = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getGitSsh() + { + return $this->git_ssh; + } + + /** + * Required. The custom git ssh hostname for the instance, e.g., + * "ssh.source.internal.mycompany.com" + * + * Generated from protobuf field string git_ssh = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setGitSsh($var) + { + GPBUtil::checkString($var, True); + $this->git_ssh = $var; + + return $this; + } + + /** + * Required. The custom git http hostname for the instance, e.g., + * "git.source.internal.mycompany.com" + * + * Generated from protobuf field string git_http = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getGitHttp() + { + return $this->git_http; + } + + /** + * Required. The custom git http hostname for the instance, e.g., + * "git.source.internal.mycompany.com" + * + * Generated from protobuf field string git_http = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setGitHttp($var) + { + GPBUtil::checkString($var, True); + $this->git_http = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/State.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/State.php new file mode 100644 index 000000000000..c78241e4663c --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/State.php @@ -0,0 +1,82 @@ +google.cloud.securesourcemanager.v1.Instance.State + */ +class State +{ + /** + * Not set. This should only be the case for incoming requests. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Instance is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * Instance is ready. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * Instance is being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * Instance is paused. + * + * Generated from protobuf enum PAUSED = 4; + */ + const PAUSED = 4; + /** + * Instance is unknown, we are not sure if it's functioning. + * + * Generated from protobuf enum UNKNOWN = 6; + */ + const UNKNOWN = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::ACTIVE => 'ACTIVE', + self::DELETING => 'DELETING', + self::PAUSED => 'PAUSED', + self::UNKNOWN => 'UNKNOWN', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/StateNote.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/StateNote.php new file mode 100644 index 000000000000..9dc35163e364 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/StateNote.php @@ -0,0 +1,62 @@ +google.cloud.securesourcemanager.v1.Instance.StateNote + */ +class StateNote +{ + /** + * STATE_NOTE_UNSPECIFIED as the first value of State. + * + * Generated from protobuf enum STATE_NOTE_UNSPECIFIED = 0; + */ + const STATE_NOTE_UNSPECIFIED = 0; + /** + * CMEK access is unavailable. + * + * Generated from protobuf enum PAUSED_CMEK_UNAVAILABLE = 1; + */ + const PAUSED_CMEK_UNAVAILABLE = 1; + /** + * INSTANCE_RESUMING indicates that the instance was previously paused + * and is under the process of being brought back. + * + * Generated from protobuf enum INSTANCE_RESUMING = 2 [deprecated = true]; + */ + const INSTANCE_RESUMING = 2; + + private static $valueToName = [ + self::STATE_NOTE_UNSPECIFIED => 'STATE_NOTE_UNSPECIFIED', + self::PAUSED_CMEK_UNAVAILABLE => 'PAUSED_CMEK_UNAVAILABLE', + self::INSTANCE_RESUMING => 'INSTANCE_RESUMING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/WorkforceIdentityFederationConfig.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/WorkforceIdentityFederationConfig.php new file mode 100644 index 000000000000..9599626dea4c --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/WorkforceIdentityFederationConfig.php @@ -0,0 +1,68 @@ +google.cloud.securesourcemanager.v1.Instance.WorkforceIdentityFederationConfig + */ +class WorkforceIdentityFederationConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Immutable. Whether Workforce Identity Federation is enabled. + * + * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + */ + protected $enabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enabled + * Optional. Immutable. Whether Workforce Identity Federation is enabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Immutable. Whether Workforce Identity Federation is enabled. + * + * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Optional. Immutable. Whether Workforce Identity Federation is enabled. + * + * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Issue.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Issue.php new file mode 100644 index 000000000000..4d9871c1c1c3 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Issue.php @@ -0,0 +1,351 @@ +google.cloud.securesourcemanager.v1.Issue + */ +class Issue extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Unique identifier for an issue. The issue id is generated by + * the server. Format: + * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. Issue title. + * + * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $title = ''; + /** + * Optional. Issue body. Provides a detailed description of the issue. + * + * Generated from protobuf field string body = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $body = ''; + /** + * Output only. State of the issue. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Issue.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Creation timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Last updated timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. Close timestamp (if closed). Cleared when is re-opened. + * + * Generated from protobuf field .google.protobuf.Timestamp close_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $close_time = null; + /** + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Unique identifier for an issue. The issue id is generated by + * the server. Format: + * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}` + * @type string $title + * Required. Issue title. + * @type string $body + * Optional. Issue body. Provides a detailed description of the issue. + * @type int $state + * Output only. State of the issue. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation timestamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last updated timestamp. + * @type \Google\Protobuf\Timestamp $close_time + * Output only. Close timestamp (if closed). Cleared when is re-opened. + * @type string $etag + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Unique identifier for an issue. The issue id is generated by + * the server. Format: + * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Unique identifier for an issue. The issue id is generated by + * the server. Format: + * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Issue title. + * + * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Required. Issue title. + * + * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * Optional. Issue body. Provides a detailed description of the issue. + * + * Generated from protobuf field string body = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getBody() + { + return $this->body; + } + + /** + * Optional. Issue body. Provides a detailed description of the issue. + * + * Generated from protobuf field string body = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkString($var, True); + $this->body = $var; + + return $this; + } + + /** + * Output only. State of the issue. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Issue.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the issue. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Issue.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecureSourceManager\V1\Issue\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Creation timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Creation timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Last updated timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Last updated timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. Close timestamp (if closed). Cleared when is re-opened. + * + * Generated from protobuf field .google.protobuf.Timestamp close_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCloseTime() + { + return $this->close_time; + } + + public function hasCloseTime() + { + return isset($this->close_time); + } + + public function clearCloseTime() + { + unset($this->close_time); + } + + /** + * Output only. Close timestamp (if closed). Cleared when is re-opened. + * + * Generated from protobuf field .google.protobuf.Timestamp close_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCloseTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->close_time = $var; + + return $this; + } + + /** + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Issue/State.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Issue/State.php new file mode 100644 index 000000000000..c63ef08ebc11 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Issue/State.php @@ -0,0 +1,61 @@ +google.cloud.securesourcemanager.v1.Issue.State + */ +class State +{ + /** + * Unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * An open issue. + * + * Generated from protobuf enum OPEN = 1; + */ + const OPEN = 1; + /** + * A closed issue. + * + * Generated from protobuf enum CLOSED = 2; + */ + const CLOSED = 2; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::OPEN => 'OPEN', + self::CLOSED => 'CLOSED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/IssueComment.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/IssueComment.php new file mode 100644 index 000000000000..be3d594d0d32 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/IssueComment.php @@ -0,0 +1,197 @@ +google.cloud.securesourcemanager.v1.IssueComment + */ +class IssueComment extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Unique identifier for an issue comment. The comment id is + * generated by the server. Format: + * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue}/issueComments/{comment_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. The comment body. + * + * Generated from protobuf field string body = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $body = ''; + /** + * Output only. Creation timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Last updated timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Unique identifier for an issue comment. The comment id is + * generated by the server. Format: + * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue}/issueComments/{comment_id}` + * @type string $body + * Required. The comment body. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation timestamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last updated timestamp. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Unique identifier for an issue comment. The comment id is + * generated by the server. Format: + * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue}/issueComments/{comment_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Unique identifier for an issue comment. The comment id is + * generated by the server. Format: + * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue}/issueComments/{comment_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The comment body. + * + * Generated from protobuf field string body = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBody() + { + return $this->body; + } + + /** + * Required. The comment body. + * + * Generated from protobuf field string body = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkString($var, True); + $this->body = $var; + + return $this; + } + + /** + * Output only. Creation timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Creation timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Last updated timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Last updated timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListBranchRulesRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListBranchRulesRequest.php new file mode 100644 index 000000000000..3134c3294373 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListBranchRulesRequest.php @@ -0,0 +1,145 @@ +google.cloud.securesourcemanager.v1.ListBranchRulesRequest + */ +class ListBranchRulesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Please see {@see SecureSourceManagerClient::repositoryName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\ListBranchRulesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * @type int $page_size + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListBranchRulesResponse.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListBranchRulesResponse.php new file mode 100644 index 000000000000..b8209ec0ade4 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListBranchRulesResponse.php @@ -0,0 +1,101 @@ +google.cloud.securesourcemanager.v1.ListBranchRulesResponse + */ +class ListBranchRulesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of branch rules. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.BranchRule branch_rules = 1; + */ + private $branch_rules; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecureSourceManager\V1\BranchRule[] $branch_rules + * The list of branch rules. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * The list of branch rules. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.BranchRule branch_rules = 1; + * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\BranchRule> + */ + public function getBranchRules() + { + return $this->branch_rules; + } + + /** + * The list of branch rules. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.BranchRule branch_rules = 1; + * @param \Google\Cloud\SecureSourceManager\V1\BranchRule[] $var + * @return $this + */ + public function setBranchRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\BranchRule::class); + $this->branch_rules = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListHooksRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListHooksRequest.php new file mode 100644 index 000000000000..51871952979b --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListHooksRequest.php @@ -0,0 +1,153 @@ +google.cloud.securesourcemanager.v1.ListHooksRequest + */ +class ListHooksRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListHooksRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Parent value for ListHooksRequest. Please see + * {@see SecureSourceManagerClient::repositoryName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\ListHooksRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value for ListHooksRequest. + * @type int $page_size + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListHooksRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for ListHooksRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListHooksResponse.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListHooksResponse.php new file mode 100644 index 000000000000..f4ba071ea96b --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListHooksResponse.php @@ -0,0 +1,101 @@ +google.cloud.securesourcemanager.v1.ListHooksResponse + */ +class ListHooksResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of hooks. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Hook hooks = 1; + */ + private $hooks; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecureSourceManager\V1\Hook[] $hooks + * The list of hooks. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * The list of hooks. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Hook hooks = 1; + * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\Hook> + */ + public function getHooks() + { + return $this->hooks; + } + + /** + * The list of hooks. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Hook hooks = 1; + * @param \Google\Cloud\SecureSourceManager\V1\Hook[] $var + * @return $this + */ + public function setHooks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\Hook::class); + $this->hooks = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListInstancesRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListInstancesRequest.php new file mode 100644 index 000000000000..8b5a8d678aef --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListInstancesRequest.php @@ -0,0 +1,221 @@ +google.cloud.securesourcemanager.v1.ListInstancesRequest + */ +class ListInstancesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListInstancesRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Filter for filtering results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for ListInstancesRequest. Please see + * {@see SecureSourceManagerClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\ListInstancesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value for ListInstancesRequest. + * @type int $page_size + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * @type string $filter + * Optional. Filter for filtering results. + * @type string $order_by + * Optional. Hint for how to order the results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListInstancesRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for ListInstancesRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Filter for filtering results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter for filtering results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListInstancesResponse.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListInstancesResponse.php new file mode 100644 index 000000000000..e8431ad87303 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListInstancesResponse.php @@ -0,0 +1,133 @@ +google.cloud.securesourcemanager.v1.ListInstancesResponse + */ +class ListInstancesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of instances. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Instance instances = 1; + */ + private $instances; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecureSourceManager\V1\Instance[] $instances + * The list of instances. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * The list of instances. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Instance instances = 1; + * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\Instance> + */ + public function getInstances() + { + return $this->instances; + } + + /** + * The list of instances. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Instance instances = 1; + * @param \Google\Cloud\SecureSourceManager\V1\Instance[] $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\Instance::class); + $this->instances = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssueCommentsRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssueCommentsRequest.php new file mode 100644 index 000000000000..94df9bc21333 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssueCommentsRequest.php @@ -0,0 +1,158 @@ +google.cloud.securesourcemanager.v1.ListIssueCommentsRequest + */ +class ListIssueCommentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The issue in which to list the comments. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The issue in which to list the comments. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` + * Please see {@see SecureSourceManagerClient::issueName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\ListIssueCommentsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The issue in which to list the comments. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` + * @type int $page_size + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The issue in which to list the comments. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The issue in which to list the comments. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssueCommentsResponse.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssueCommentsResponse.php new file mode 100644 index 000000000000..92abc39dbb4b --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssueCommentsResponse.php @@ -0,0 +1,101 @@ +google.cloud.securesourcemanager.v1.ListIssueCommentsResponse + */ +class ListIssueCommentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of issue comments. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.IssueComment issue_comments = 1; + */ + private $issue_comments; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecureSourceManager\V1\IssueComment[] $issue_comments + * The list of issue comments. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * The list of issue comments. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.IssueComment issue_comments = 1; + * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\IssueComment> + */ + public function getIssueComments() + { + return $this->issue_comments; + } + + /** + * The list of issue comments. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.IssueComment issue_comments = 1; + * @param \Google\Cloud\SecureSourceManager\V1\IssueComment[] $var + * @return $this + */ + public function setIssueComments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\IssueComment::class); + $this->issue_comments = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssuesRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssuesRequest.php new file mode 100644 index 000000000000..a8ac09ebc1b9 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssuesRequest.php @@ -0,0 +1,192 @@ +google.cloud.securesourcemanager.v1.ListIssuesRequest + */ +class ListIssuesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The repository in which to list issues. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Used to filter the resulting issues list. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The repository in which to list issues. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + * Please see {@see SecureSourceManagerClient::repositoryName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\ListIssuesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The repository in which to list issues. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + * @type int $page_size + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * @type string $filter + * Optional. Used to filter the resulting issues list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The repository in which to list issues. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The repository in which to list issues. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Used to filter the resulting issues list. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Used to filter the resulting issues list. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssuesResponse.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssuesResponse.php new file mode 100644 index 000000000000..b81d84e81f67 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssuesResponse.php @@ -0,0 +1,101 @@ +google.cloud.securesourcemanager.v1.ListIssuesResponse + */ +class ListIssuesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of issues. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Issue issues = 1; + */ + private $issues; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecureSourceManager\V1\Issue[] $issues + * The list of issues. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * The list of issues. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Issue issues = 1; + * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\Issue> + */ + public function getIssues() + { + return $this->issues; + } + + /** + * The list of issues. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Issue issues = 1; + * @param \Google\Cloud\SecureSourceManager\V1\Issue[] $var + * @return $this + */ + public function setIssues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\Issue::class); + $this->issues = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestCommentsRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestCommentsRequest.php new file mode 100644 index 000000000000..af4de23807bc --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestCommentsRequest.php @@ -0,0 +1,158 @@ +google.cloud.securesourcemanager.v1.ListPullRequestCommentsRequest + */ +class ListPullRequestCommentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * 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}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent 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}` + * Please see {@see SecureSourceManagerClient::pullRequestName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\ListPullRequestCommentsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * 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}` + * @type int $page_size + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * 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}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * 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}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestCommentsResponse.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestCommentsResponse.php new file mode 100644 index 000000000000..e81e6e83c299 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestCommentsResponse.php @@ -0,0 +1,105 @@ +google.cloud.securesourcemanager.v1.ListPullRequestCommentsResponse + */ +class ListPullRequestCommentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of pull request comments. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comments = 1; + */ + private $pull_request_comments; + /** + * A token to set as page_token to retrieve the next page. If this field is + * omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecureSourceManager\V1\PullRequestComment[] $pull_request_comments + * The list of pull request comments. + * @type string $next_page_token + * A token to set as page_token to retrieve the next page. If this field is + * omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * The list of pull request comments. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comments = 1; + * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\PullRequestComment> + */ + public function getPullRequestComments() + { + return $this->pull_request_comments; + } + + /** + * The list of pull request comments. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comments = 1; + * @param \Google\Cloud\SecureSourceManager\V1\PullRequestComment[] $var + * @return $this + */ + public function setPullRequestComments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\PullRequestComment::class); + $this->pull_request_comments = $arr; + + return $this; + } + + /** + * A token to set as page_token to retrieve the next page. If this field is + * omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to set as page_token to retrieve the next page. If this field is + * omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestFileDiffsRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestFileDiffsRequest.php new file mode 100644 index 000000000000..4f3c0ed6584d --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestFileDiffsRequest.php @@ -0,0 +1,164 @@ +google.cloud.securesourcemanager.v1.ListPullRequestFileDiffsRequest + */ +class ListPullRequestFileDiffsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The pull request to list file diffs for. + * Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $name Required. The pull request to list file diffs for. + * Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + * Please see {@see SecureSourceManagerClient::pullRequestName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\ListPullRequestFileDiffsRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The pull request to list file diffs for. + * Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + * @type int $page_size + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The pull request to list file diffs for. + * Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The pull request to list file diffs for. + * Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestFileDiffsResponse.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestFileDiffsResponse.php new file mode 100644 index 000000000000..8f2b4a059880 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestFileDiffsResponse.php @@ -0,0 +1,102 @@ +google.cloud.securesourcemanager.v1.ListPullRequestFileDiffsResponse + */ +class ListPullRequestFileDiffsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of pull request file diffs. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.FileDiff file_diffs = 1; + */ + private $file_diffs; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecureSourceManager\V1\FileDiff[] $file_diffs + * The list of pull request file diffs. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * The list of pull request file diffs. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.FileDiff file_diffs = 1; + * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\FileDiff> + */ + public function getFileDiffs() + { + return $this->file_diffs; + } + + /** + * The list of pull request file diffs. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.FileDiff file_diffs = 1; + * @param \Google\Cloud\SecureSourceManager\V1\FileDiff[] $var + * @return $this + */ + public function setFileDiffs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\FileDiff::class); + $this->file_diffs = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestsRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestsRequest.php new file mode 100644 index 000000000000..8da23667714b --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestsRequest.php @@ -0,0 +1,158 @@ +google.cloud.securesourcemanager.v1.ListPullRequestsRequest + */ +class ListPullRequestsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The repository in which to list pull requests. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The repository in which to list pull requests. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + * Please see {@see SecureSourceManagerClient::repositoryName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\ListPullRequestsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The repository in which to list pull requests. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + * @type int $page_size + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The repository in which to list pull requests. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The repository in which to list pull requests. Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestsResponse.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestsResponse.php new file mode 100644 index 000000000000..cf96b0ea3d7c --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestsResponse.php @@ -0,0 +1,101 @@ +google.cloud.securesourcemanager.v1.ListPullRequestsResponse + */ +class ListPullRequestsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of pull requests. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequest pull_requests = 1; + */ + private $pull_requests; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecureSourceManager\V1\PullRequest[] $pull_requests + * The list of pull requests. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * The list of pull requests. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequest pull_requests = 1; + * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\PullRequest> + */ + public function getPullRequests() + { + return $this->pull_requests; + } + + /** + * The list of pull requests. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequest pull_requests = 1; + * @param \Google\Cloud\SecureSourceManager\V1\PullRequest[] $var + * @return $this + */ + public function setPullRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\PullRequest::class); + $this->pull_requests = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListRepositoriesRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListRepositoriesRequest.php new file mode 100644 index 000000000000..3fe139d5064c --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListRepositoriesRequest.php @@ -0,0 +1,241 @@ +google.cloud.securesourcemanager.v1.ListRepositoriesRequest + */ +class ListRepositoriesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListRepositoriesRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Filter results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. The name of the instance in which the repository is hosted, + * formatted as + * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. + * When listing repositories via securesourcemanager.googleapis.com, this + * field is required. When listing repositories via *.sourcemanager.dev, this + * field is ignored. + * + * Generated from protobuf field string instance = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $instance = ''; + + /** + * @param string $parent Required. Parent value for ListRepositoriesRequest. Please see + * {@see SecureSourceManagerClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\ListRepositoriesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value for ListRepositoriesRequest. + * @type int $page_size + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * @type string $filter + * Optional. Filter results. + * @type string $instance + * Optional. The name of the instance in which the repository is hosted, + * formatted as + * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. + * When listing repositories via securesourcemanager.googleapis.com, this + * field is required. When listing repositories via *.sourcemanager.dev, this + * field is ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListRepositoriesRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for ListRepositoriesRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Filter results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. The name of the instance in which the repository is hosted, + * formatted as + * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. + * When listing repositories via securesourcemanager.googleapis.com, this + * field is required. When listing repositories via *.sourcemanager.dev, this + * field is ignored. + * + * Generated from protobuf field string instance = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Optional. The name of the instance in which the repository is hosted, + * formatted as + * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. + * When listing repositories via securesourcemanager.googleapis.com, this + * field is required. When listing repositories via *.sourcemanager.dev, this + * field is ignored. + * + * Generated from protobuf field string instance = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListRepositoriesResponse.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListRepositoriesResponse.php new file mode 100644 index 000000000000..1cce0311ff54 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListRepositoriesResponse.php @@ -0,0 +1,99 @@ +google.cloud.securesourcemanager.v1.ListRepositoriesResponse + */ +class ListRepositoriesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of repositories. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Repository repositories = 1; + */ + private $repositories; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecureSourceManager\V1\Repository[] $repositories + * The list of repositories. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * The list of repositories. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Repository repositories = 1; + * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\Repository> + */ + public function getRepositories() + { + return $this->repositories; + } + + /** + * The list of repositories. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Repository repositories = 1; + * @param \Google\Cloud\SecureSourceManager\V1\Repository[] $var + * @return $this + */ + public function setRepositories($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\Repository::class); + $this->repositories = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/MergePullRequestRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/MergePullRequestRequest.php new file mode 100644 index 000000000000..d41da276f3c7 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/MergePullRequestRequest.php @@ -0,0 +1,91 @@ +google.cloud.securesourcemanager.v1.MergePullRequestRequest + */ +class MergePullRequestRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The pull request to merge. + * Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The pull request to merge. + * Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + * Please see {@see SecureSourceManagerClient::pullRequestName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\MergePullRequestRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The pull request to merge. + * Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The pull request to merge. + * Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The pull request to merge. + * Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/OpenIssueRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/OpenIssueRequest.php new file mode 100644 index 000000000000..57cb475ee6dc --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/OpenIssueRequest.php @@ -0,0 +1,133 @@ +google.cloud.securesourcemanager.v1.OpenIssueRequest + */ +class OpenIssueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the issue to open. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The current etag of the issue. + * If the etag is provided and does not match the current etag of the issue, + * opening will be blocked and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + + /** + * @param string $name Required. Name of the issue to open. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. Please see + * {@see SecureSourceManagerClient::issueName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\OpenIssueRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the issue to open. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + * @type string $etag + * Optional. The current etag of the issue. + * If the etag is provided and does not match the current etag of the issue, + * opening will be blocked and an ABORTED error will be returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the issue to open. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the issue to open. + * The format is + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The current etag of the issue. + * If the etag is provided and does not match the current etag of the issue, + * opening will be blocked and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. The current etag of the issue. + * If the etag is provided and does not match the current etag of the issue, + * opening will be blocked and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/OpenPullRequestRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/OpenPullRequestRequest.php new file mode 100644 index 000000000000..90650941f083 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/OpenPullRequestRequest.php @@ -0,0 +1,91 @@ +google.cloud.securesourcemanager.v1.OpenPullRequestRequest + */ +class OpenPullRequestRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The pull request to open. + * Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The pull request to open. + * Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + * Please see {@see SecureSourceManagerClient::pullRequestName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\OpenPullRequestRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The pull request to open. + * Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The pull request to open. + * Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The pull request to open. + * Format: + * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/OperationMetadata.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/OperationMetadata.php new file mode 100644 index 000000000000..24c91f25ad50 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/OperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.securesourcemanager.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verb = ''; + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_message = ''; + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][google.longrunning.Operation.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the operation finished running. + * @type string $target + * Output only. Server-defined resource path for the target of the operation. + * @type string $verb + * Output only. Name of the verb executed by the operation. + * @type string $status_message + * Output only. Human-readable status of the operation, if any. + * @type bool $requested_cancellation + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][google.longrunning.Operation.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * @type string $api_version + * Output only. API version used to start the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][google.longrunning.Operation.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][google.longrunning.Operation.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequest.php new file mode 100644 index 000000000000..8f6c0fd4ff36 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequest.php @@ -0,0 +1,406 @@ +google.cloud.securesourcemanager.v1.PullRequest + */ +class PullRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Identifier. A unique identifier for a PullRequest. The number + * appended at the end is generated by the server. Format: + * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Required. The pull request title. + * + * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $title = ''; + /** + * Optional. The pull request body. Provides a detailed description of the + * changes. + * + * Generated from protobuf field string body = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $body = ''; + /** + * Required. The branch to merge changes in. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest.Branch base = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $base = null; + /** + * Immutable. The branch containing the changes to be merged. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest.Branch head = 5 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $head = null; + /** + * Output only. State of the pull request (open, closed or merged). + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Creation timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Last updated timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. Close timestamp (if closed or merged). Cleared when pull + * request is re-opened. + * + * Generated from protobuf field .google.protobuf.Timestamp close_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $close_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Identifier. A unique identifier for a PullRequest. The number + * appended at the end is generated by the server. Format: + * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request_id}` + * @type string $title + * Required. The pull request title. + * @type string $body + * Optional. The pull request body. Provides a detailed description of the + * changes. + * @type \Google\Cloud\SecureSourceManager\V1\PullRequest\Branch $base + * Required. The branch to merge changes in. + * @type \Google\Cloud\SecureSourceManager\V1\PullRequest\Branch $head + * Immutable. The branch containing the changes to be merged. + * @type int $state + * Output only. State of the pull request (open, closed or merged). + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation timestamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last updated timestamp. + * @type \Google\Protobuf\Timestamp $close_time + * Output only. Close timestamp (if closed or merged). Cleared when pull + * request is re-opened. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Identifier. A unique identifier for a PullRequest. The number + * appended at the end is generated by the server. Format: + * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Identifier. A unique identifier for a PullRequest. The number + * appended at the end is generated by the server. Format: + * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The pull request title. + * + * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Required. The pull request title. + * + * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * Optional. The pull request body. Provides a detailed description of the + * changes. + * + * Generated from protobuf field string body = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getBody() + { + return $this->body; + } + + /** + * Optional. The pull request body. Provides a detailed description of the + * changes. + * + * Generated from protobuf field string body = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkString($var, True); + $this->body = $var; + + return $this; + } + + /** + * Required. The branch to merge changes in. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest.Branch base = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecureSourceManager\V1\PullRequest\Branch|null + */ + public function getBase() + { + return $this->base; + } + + public function hasBase() + { + return isset($this->base); + } + + public function clearBase() + { + unset($this->base); + } + + /** + * Required. The branch to merge changes in. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest.Branch base = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecureSourceManager\V1\PullRequest\Branch $var + * @return $this + */ + public function setBase($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\PullRequest\Branch::class); + $this->base = $var; + + return $this; + } + + /** + * Immutable. The branch containing the changes to be merged. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest.Branch head = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\SecureSourceManager\V1\PullRequest\Branch|null + */ + public function getHead() + { + return $this->head; + } + + public function hasHead() + { + return isset($this->head); + } + + public function clearHead() + { + unset($this->head); + } + + /** + * Immutable. The branch containing the changes to be merged. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest.Branch head = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\SecureSourceManager\V1\PullRequest\Branch $var + * @return $this + */ + public function setHead($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\PullRequest\Branch::class); + $this->head = $var; + + return $this; + } + + /** + * Output only. State of the pull request (open, closed or merged). + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the pull request (open, closed or merged). + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecureSourceManager\V1\PullRequest\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Creation timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Creation timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Last updated timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Last updated timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. Close timestamp (if closed or merged). Cleared when pull + * request is re-opened. + * + * Generated from protobuf field .google.protobuf.Timestamp close_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCloseTime() + { + return $this->close_time; + } + + public function hasCloseTime() + { + return isset($this->close_time); + } + + public function clearCloseTime() + { + unset($this->close_time); + } + + /** + * Output only. Close timestamp (if closed or merged). Cleared when pull + * request is re-opened. + * + * Generated from protobuf field .google.protobuf.Timestamp close_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCloseTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->close_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequest/Branch.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequest/Branch.php new file mode 100644 index 000000000000..f98d640a1d9f --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequest/Branch.php @@ -0,0 +1,101 @@ +google.cloud.securesourcemanager.v1.PullRequest.Branch + */ +class Branch extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the branch. + * + * Generated from protobuf field string ref = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ref = ''; + /** + * Output only. The commit at the tip of the branch. + * + * Generated from protobuf field string sha = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $sha = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $ref + * Required. Name of the branch. + * @type string $sha + * Output only. The commit at the tip of the branch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the branch. + * + * Generated from protobuf field string ref = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRef() + { + return $this->ref; + } + + /** + * Required. Name of the branch. + * + * Generated from protobuf field string ref = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRef($var) + { + GPBUtil::checkString($var, True); + $this->ref = $var; + + return $this; + } + + /** + * Output only. The commit at the tip of the branch. + * + * Generated from protobuf field string sha = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSha() + { + return $this->sha; + } + + /** + * Output only. The commit at the tip of the branch. + * + * Generated from protobuf field string sha = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSha($var) + { + GPBUtil::checkString($var, True); + $this->sha = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequest/State.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequest/State.php new file mode 100644 index 000000000000..ff106fbf8132 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequest/State.php @@ -0,0 +1,68 @@ +google.cloud.securesourcemanager.v1.PullRequest.State + */ +class State +{ + /** + * Unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * An open pull request. + * + * Generated from protobuf enum OPEN = 1; + */ + const OPEN = 1; + /** + * A closed pull request. + * + * Generated from protobuf enum CLOSED = 2; + */ + const CLOSED = 2; + /** + * A merged pull request. + * + * Generated from protobuf enum MERGED = 3; + */ + const MERGED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::OPEN => 'OPEN', + self::CLOSED => 'CLOSED', + self::MERGED => 'MERGED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment.php new file mode 100644 index 000000000000..c0670b6f9f02 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment.php @@ -0,0 +1,271 @@ +google.cloud.securesourcemanager.v1.PullRequestComment + */ +class PullRequestComment extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Unique identifier for the pull request comment. The comment id + * is generated by the server. Format: + * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}/pullRequestComments/{comment_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Creation timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Last updated timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + protected $comment_detail; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Unique identifier for the pull request comment. The comment id + * is generated by the server. Format: + * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}/pullRequestComments/{comment_id}` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation timestamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last updated timestamp. + * @type \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Review $review + * Optional. The review summary comment. + * @type \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Comment $comment + * Optional. The general pull request comment. + * @type \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Code $code + * Optional. The comment on a code line. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Unique identifier for the pull request comment. The comment id + * is generated by the server. Format: + * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}/pullRequestComments/{comment_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Unique identifier for the pull request comment. The comment id + * is generated by the server. Format: + * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}/pullRequestComments/{comment_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Creation timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Creation timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Last updated timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Last updated timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional. The review summary comment. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment.Review review = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Review|null + */ + public function getReview() + { + return $this->readOneof(4); + } + + public function hasReview() + { + return $this->hasOneof(4); + } + + /** + * Optional. The review summary comment. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment.Review review = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Review $var + * @return $this + */ + public function setReview($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Review::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Optional. The general pull request comment. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment.Comment comment = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Comment|null + */ + public function getComment() + { + return $this->readOneof(5); + } + + public function hasComment() + { + return $this->hasOneof(5); + } + + /** + * Optional. The general pull request comment. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment.Comment comment = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Comment $var + * @return $this + */ + public function setComment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Comment::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Optional. The comment on a code line. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment.Code code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Code|null + */ + public function getCode() + { + return $this->readOneof(6); + } + + public function hasCode() + { + return $this->hasOneof(6); + } + + /** + * Optional. The comment on a code line. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment.Code code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Code $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Code::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getCommentDetail() + { + return $this->whichOneof("comment_detail"); + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Code.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Code.php new file mode 100644 index 000000000000..2d28d2b70b9b --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Code.php @@ -0,0 +1,255 @@ +google.cloud.securesourcemanager.v1.PullRequestComment.Code + */ +class Code extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The comment body. + * + * Generated from protobuf field string body = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $body = ''; + /** + * Optional. Input only. The PullRequestComment resource name that this + * comment is replying to. + * + * Generated from protobuf field string reply = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $reply = ''; + /** + * Optional. The position of the comment. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment.Position position = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $position = null; + /** + * Output only. The root comment of the conversation, derived from the reply + * field. + * + * Generated from protobuf field string effective_root_comment = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $effective_root_comment = ''; + /** + * Output only. Boolean indicator if the comment is resolved. + * + * Generated from protobuf field bool resolved = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $resolved = false; + /** + * Output only. The effective commit sha this code comment is pointing to. + * + * Generated from protobuf field string effective_commit_sha = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $effective_commit_sha = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $body + * Required. The comment body. + * @type string $reply + * Optional. Input only. The PullRequestComment resource name that this + * comment is replying to. + * @type \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Position $position + * Optional. The position of the comment. + * @type string $effective_root_comment + * Output only. The root comment of the conversation, derived from the reply + * field. + * @type bool $resolved + * Output only. Boolean indicator if the comment is resolved. + * @type string $effective_commit_sha + * Output only. The effective commit sha this code comment is pointing to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The comment body. + * + * Generated from protobuf field string body = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBody() + { + return $this->body; + } + + /** + * Required. The comment body. + * + * Generated from protobuf field string body = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkString($var, True); + $this->body = $var; + + return $this; + } + + /** + * Optional. Input only. The PullRequestComment resource name that this + * comment is replying to. + * + * Generated from protobuf field string reply = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getReply() + { + return $this->reply; + } + + /** + * Optional. Input only. The PullRequestComment resource name that this + * comment is replying to. + * + * Generated from protobuf field string reply = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setReply($var) + { + GPBUtil::checkString($var, True); + $this->reply = $var; + + return $this; + } + + /** + * Optional. The position of the comment. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment.Position position = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Position|null + */ + public function getPosition() + { + return $this->position; + } + + public function hasPosition() + { + return isset($this->position); + } + + public function clearPosition() + { + unset($this->position); + } + + /** + * Optional. The position of the comment. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment.Position position = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Position $var + * @return $this + */ + public function setPosition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Position::class); + $this->position = $var; + + return $this; + } + + /** + * Output only. The root comment of the conversation, derived from the reply + * field. + * + * Generated from protobuf field string effective_root_comment = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEffectiveRootComment() + { + return $this->effective_root_comment; + } + + /** + * Output only. The root comment of the conversation, derived from the reply + * field. + * + * Generated from protobuf field string effective_root_comment = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEffectiveRootComment($var) + { + GPBUtil::checkString($var, True); + $this->effective_root_comment = $var; + + return $this; + } + + /** + * Output only. Boolean indicator if the comment is resolved. + * + * Generated from protobuf field bool resolved = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getResolved() + { + return $this->resolved; + } + + /** + * Output only. Boolean indicator if the comment is resolved. + * + * Generated from protobuf field bool resolved = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setResolved($var) + { + GPBUtil::checkBool($var); + $this->resolved = $var; + + return $this; + } + + /** + * Output only. The effective commit sha this code comment is pointing to. + * + * Generated from protobuf field string effective_commit_sha = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEffectiveCommitSha() + { + return $this->effective_commit_sha; + } + + /** + * Output only. The effective commit sha this code comment is pointing to. + * + * Generated from protobuf field string effective_commit_sha = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEffectiveCommitSha($var) + { + GPBUtil::checkString($var, True); + $this->effective_commit_sha = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Comment.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Comment.php new file mode 100644 index 000000000000..0f8cb7091c02 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Comment.php @@ -0,0 +1,67 @@ +google.cloud.securesourcemanager.v1.PullRequestComment.Comment + */ +class Comment extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The comment body. + * + * Generated from protobuf field string body = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $body = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $body + * Required. The comment body. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The comment body. + * + * Generated from protobuf field string body = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBody() + { + return $this->body; + } + + /** + * Required. The comment body. + * + * Generated from protobuf field string body = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkString($var, True); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Position.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Position.php new file mode 100644 index 000000000000..f568286169cd --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Position.php @@ -0,0 +1,105 @@ +google.cloud.securesourcemanager.v1.PullRequestComment.Position + */ +class Position extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The path of the file. + * + * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $path = ''; + /** + * Required. The line number of the comment. Positive value means it's on + * the new side of the diff, negative value means it's on the old side. + * + * Generated from protobuf field int64 line = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $line = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $path + * Required. The path of the file. + * @type int|string $line + * Required. The line number of the comment. Positive value means it's on + * the new side of the diff, negative value means it's on the old side. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The path of the file. + * + * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Required. The path of the file. + * + * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->path = $var; + + return $this; + } + + /** + * Required. The line number of the comment. Positive value means it's on + * the new side of the diff, negative value means it's on the old side. + * + * Generated from protobuf field int64 line = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int|string + */ + public function getLine() + { + return $this->line; + } + + /** + * Required. The line number of the comment. Positive value means it's on + * the new side of the diff, negative value means it's on the old side. + * + * Generated from protobuf field int64 line = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int|string $var + * @return $this + */ + public function setLine($var) + { + GPBUtil::checkInt64($var); + $this->line = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Review.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Review.php new file mode 100644 index 000000000000..08713e27fb10 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Review.php @@ -0,0 +1,135 @@ +google.cloud.securesourcemanager.v1.PullRequestComment.Review + */ +class Review extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The review action type. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment.Review.ActionType action_type = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $action_type = 0; + /** + * Optional. The comment body. + * + * Generated from protobuf field string body = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $body = ''; + /** + * Output only. The effective commit sha this review is pointing to. + * + * Generated from protobuf field string effective_commit_sha = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $effective_commit_sha = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $action_type + * Required. The review action type. + * @type string $body + * Optional. The comment body. + * @type string $effective_commit_sha + * Output only. The effective commit sha this review is pointing to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The review action type. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment.Review.ActionType action_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getActionType() + { + return $this->action_type; + } + + /** + * Required. The review action type. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment.Review.ActionType action_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setActionType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Review\ActionType::class); + $this->action_type = $var; + + return $this; + } + + /** + * Optional. The comment body. + * + * Generated from protobuf field string body = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getBody() + { + return $this->body; + } + + /** + * Optional. The comment body. + * + * Generated from protobuf field string body = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkString($var, True); + $this->body = $var; + + return $this; + } + + /** + * Output only. The effective commit sha this review is pointing to. + * + * Generated from protobuf field string effective_commit_sha = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEffectiveCommitSha() + { + return $this->effective_commit_sha; + } + + /** + * Output only. The effective commit sha this review is pointing to. + * + * Generated from protobuf field string effective_commit_sha = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEffectiveCommitSha($var) + { + GPBUtil::checkString($var, True); + $this->effective_commit_sha = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Review/ActionType.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Review/ActionType.php new file mode 100644 index 000000000000..9a36ea1ca2ec --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Review/ActionType.php @@ -0,0 +1,68 @@ +google.cloud.securesourcemanager.v1.PullRequestComment.Review.ActionType + */ +class ActionType +{ + /** + * Unspecified. + * + * Generated from protobuf enum ACTION_TYPE_UNSPECIFIED = 0; + */ + const ACTION_TYPE_UNSPECIFIED = 0; + /** + * A general review comment. + * + * Generated from protobuf enum COMMENT = 1; + */ + const COMMENT = 1; + /** + * Change required from this review. + * + * Generated from protobuf enum CHANGE_REQUESTED = 2; + */ + const CHANGE_REQUESTED = 2; + /** + * Change approved from this review. + * + * Generated from protobuf enum APPROVED = 3; + */ + const APPROVED = 3; + + private static $valueToName = [ + self::ACTION_TYPE_UNSPECIFIED => 'ACTION_TYPE_UNSPECIFIED', + self::COMMENT => 'COMMENT', + self::CHANGE_REQUESTED => 'CHANGE_REQUESTED', + self::APPROVED => 'APPROVED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Repository.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Repository.php new file mode 100644 index 000000000000..bad0b241613b --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Repository.php @@ -0,0 +1,419 @@ +google.cloud.securesourcemanager.v1.Repository + */ +class Repository extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. A unique identifier for a repository. The name should be of the + * format: + * `projects/{project}/locations/{location_id}/repositories/{repository_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. Description of the repository, which cannot exceed 500 + * characters. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. The name of the instance in which the repository is hosted, + * formatted as + * `projects/{project_number}/locations/{location_id}/instances/{instance_id}` + * When creating repository via securesourcemanager.googleapis.com, this field + * is used as input. When creating repository via *.sourcemanager.dev, this + * field is output only. + * + * Generated from protobuf field string instance = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $instance = ''; + /** + * Output only. Unique identifier of the repository. + * + * Generated from protobuf field string uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + */ + protected $uid = ''; + /** + * Output only. Create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + /** + * Output only. URIs for the repository. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Repository.URIs uris = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uris = null; + /** + * Input only. Initial configurations for the repository. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Repository.InitialConfig initial_config = 10 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $initial_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. A unique identifier for a repository. The name should be of the + * format: + * `projects/{project}/locations/{location_id}/repositories/{repository_id}` + * @type string $description + * Optional. Description of the repository, which cannot exceed 500 + * characters. + * @type string $instance + * Optional. The name of the instance in which the repository is hosted, + * formatted as + * `projects/{project_number}/locations/{location_id}/instances/{instance_id}` + * When creating repository via securesourcemanager.googleapis.com, this field + * is used as input. When creating repository via *.sourcemanager.dev, this + * field is output only. + * @type string $uid + * Output only. Unique identifier of the repository. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Create timestamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Update timestamp. + * @type string $etag + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * @type \Google\Cloud\SecureSourceManager\V1\Repository\URIs $uris + * Output only. URIs for the repository. + * @type \Google\Cloud\SecureSourceManager\V1\Repository\InitialConfig $initial_config + * Input only. Initial configurations for the repository. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. A unique identifier for a repository. The name should be of the + * format: + * `projects/{project}/locations/{location_id}/repositories/{repository_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. A unique identifier for a repository. The name should be of the + * format: + * `projects/{project}/locations/{location_id}/repositories/{repository_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Description of the repository, which cannot exceed 500 + * characters. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the repository, which cannot exceed 500 + * characters. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. The name of the instance in which the repository is hosted, + * formatted as + * `projects/{project_number}/locations/{location_id}/instances/{instance_id}` + * When creating repository via securesourcemanager.googleapis.com, this field + * is used as input. When creating repository via *.sourcemanager.dev, this + * field is output only. + * + * Generated from protobuf field string instance = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Optional. The name of the instance in which the repository is hosted, + * formatted as + * `projects/{project_number}/locations/{location_id}/instances/{instance_id}` + * When creating repository via securesourcemanager.googleapis.com, this field + * is used as input. When creating repository via *.sourcemanager.dev, this + * field is output only. + * + * Generated from protobuf field string instance = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Output only. Unique identifier of the repository. + * + * Generated from protobuf field string uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. Unique identifier of the repository. + * + * Generated from protobuf field string uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. Create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. This checksum is computed by the server based on the value of + * other fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Output only. URIs for the repository. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Repository.URIs uris = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\SecureSourceManager\V1\Repository\URIs|null + */ + public function getUris() + { + return $this->uris; + } + + public function hasUris() + { + return isset($this->uris); + } + + public function clearUris() + { + unset($this->uris); + } + + /** + * Output only. URIs for the repository. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Repository.URIs uris = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\SecureSourceManager\V1\Repository\URIs $var + * @return $this + */ + public function setUris($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\Repository\URIs::class); + $this->uris = $var; + + return $this; + } + + /** + * Input only. Initial configurations for the repository. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Repository.InitialConfig initial_config = 10 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Cloud\SecureSourceManager\V1\Repository\InitialConfig|null + */ + public function getInitialConfig() + { + return $this->initial_config; + } + + public function hasInitialConfig() + { + return isset($this->initial_config); + } + + public function clearInitialConfig() + { + unset($this->initial_config); + } + + /** + * Input only. Initial configurations for the repository. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Repository.InitialConfig initial_config = 10 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param \Google\Cloud\SecureSourceManager\V1\Repository\InitialConfig $var + * @return $this + */ + public function setInitialConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\Repository\InitialConfig::class); + $this->initial_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Repository/InitialConfig.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Repository/InitialConfig.php new file mode 100644 index 000000000000..ef6e1d6cf7e6 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Repository/InitialConfig.php @@ -0,0 +1,665 @@ +google.cloud.securesourcemanager.v1.Repository.InitialConfig + */ +class InitialConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Default branch name of the repository. + * + * Generated from protobuf field string default_branch = 1; + */ + protected $default_branch = ''; + /** + * List of gitignore template names user can choose from. + * Valid values: actionscript, ada, agda, android, + * anjuta, ansible, appcelerator-titanium, app-engine, archives, + * arch-linux-packages, atmel-studio, autotools, backup, bazaar, bazel, + * bitrix, bricx-cc, c, cake-php, calabash, cf-wheels, chef-cookbook, + * clojure, cloud9, c-make, code-igniter, code-kit, code-sniffer, + * common-lisp, composer, concrete5, coq, cordova, cpp, craft-cms, cuda, + * cvs, d, dart, dart-editor, delphi, diff, dm, dreamweaver, dropbox, + * drupal, drupal-7, eagle, eclipse, eiffel-studio, elisp, elixir, elm, + * emacs, ensime, epi-server, erlang, esp-idf, espresso, exercism, + * expression-engine, ext-js, fancy, finale, flex-builder, force-dot-com, + * fortran, fuel-php, gcov, git-book, gnome-shell-extension, go, godot, gpg, + * gradle, grails, gwt, haskell, hugo, iar-ewarm, idris, igor-pro, images, + * infor-cms, java, jboss, jboss-4, jboss-6, jdeveloper, jekyll, + * jenkins-home, jenv, jet-brains, jigsaw, joomla, julia, jupyter-notebooks, + * kate, kdevelop4, kentico, ki-cad, kohana, kotlin, lab-view, laravel, + * lazarus, leiningen, lemon-stand, libre-office, lilypond, linux, lithium, + * logtalk, lua, lyx, mac-os, magento, magento-1, magento-2, matlab, maven, + * mercurial, mercury, metals, meta-programming-system, meteor, + * microsoft-office, model-sim, momentics, mono-develop, nanoc, net-beans, + * nikola, nim, ninja, node, notepad-pp, nwjs, objective--c, ocaml, octave, + * opa, open-cart, openssl, oracle-forms, otto, packer, patch, perl, perl6, + * phalcon, phoenix, pimcore, play-framework, plone, prestashop, processing, + * psoc-creator, puppet, pure-script, putty, python, qooxdoo, qt, r, racket, + * rails, raku, red, redcar, redis, rhodes-rhomobile, ros, ruby, rust, sam, + * sass, sbt, scala, scheme, scons, scrivener, sdcc, seam-gen, sketch-up, + * slick-edit, smalltalk, snap, splunk, stata, stella, sublime-text, + * sugar-crm, svn, swift, symfony, symphony-cms, synopsys-vcs, tags, + * terraform, tex, text-mate, textpattern, think-php, tortoise-git, + * turbo-gears-2, typo3, umbraco, unity, unreal-engine, vagrant, vim, + * virtual-env, virtuoso, visual-studio, visual-studio-code, vue, vvvv, waf, + * web-methods, windows, word-press, xcode, xilinx, xilinx-ise, xojo, + * yeoman, yii, zend-framework, zephir. + * + * Generated from protobuf field repeated string gitignores = 2; + */ + private $gitignores; + /** + * License template name user can choose from. + * Valid values: license-0bsd, license-389-exception, aal, abstyles, + * adobe-2006, adobe-glyph, adsl, afl-1-1, afl-1-2, afl-2-0, afl-2-1, + * afl-3-0, afmparse, agpl-1-0, agpl-1-0-only, agpl-1-0-or-later, + * agpl-3-0-only, agpl-3-0-or-later, aladdin, amdplpa, aml, ampas, antlr-pd, + * antlr-pd-fallback, apache-1-0, apache-1-1, apache-2-0, apafml, apl-1-0, + * apsl-1-0, apsl-1-1, apsl-1-2, apsl-2-0, artistic-1-0, artistic-1-0-cl8, + * artistic-1-0-perl, artistic-2-0, autoconf-exception-2-0, + * autoconf-exception-3-0, bahyph, barr, beerware, bison-exception-2-2, + * bittorrent-1-0, bittorrent-1-1, blessing, blueoak-1-0-0, + * bootloader-exception, borceux, bsd-1-clause, bsd-2-clause, + * bsd-2-clause-freebsd, bsd-2-clause-netbsd, bsd-2-clause-patent, + * bsd-2-clause-views, bsd-3-clause, bsd-3-clause-attribution, + * bsd-3-clause-clear, bsd-3-clause-lbnl, bsd-3-clause-modification, + * bsd-3-clause-no-nuclear-license, bsd-3-clause-no-nuclear-license-2014, + * bsd-3-clause-no-nuclear-warranty, bsd-3-clause-open-mpi, bsd-4-clause, + * bsd-4-clause-shortened, bsd-4-clause-uc, bsd-protection, bsd-source-code, + * bsl-1-0, busl-1-1, cal-1-0, cal-1-0-combined-work-exception, caldera, + * catosl-1-1, cc0-1-0, cc-by-1-0, cc-by-2-0, cc-by-3-0, cc-by-3-0-at, + * cc-by-3-0-us, cc-by-4-0, cc-by-nc-1-0, cc-by-nc-2-0, cc-by-nc-3-0, + * cc-by-nc-4-0, cc-by-nc-nd-1-0, cc-by-nc-nd-2-0, cc-by-nc-nd-3-0, + * cc-by-nc-nd-3-0-igo, cc-by-nc-nd-4-0, cc-by-nc-sa-1-0, cc-by-nc-sa-2-0, + * cc-by-nc-sa-3-0, cc-by-nc-sa-4-0, cc-by-nd-1-0, cc-by-nd-2-0, + * cc-by-nd-3-0, cc-by-nd-4-0, cc-by-sa-1-0, cc-by-sa-2-0, cc-by-sa-2-0-uk, + * cc-by-sa-2-1-jp, cc-by-sa-3-0, cc-by-sa-3-0-at, cc-by-sa-4-0, cc-pddc, + * cddl-1-0, cddl-1-1, cdla-permissive-1-0, cdla-sharing-1-0, cecill-1-0, + * cecill-1-1, cecill-2-0, cecill-2-1, cecill-b, cecill-c, cern-ohl-1-1, + * cern-ohl-1-2, cern-ohl-p-2-0, cern-ohl-s-2-0, cern-ohl-w-2-0, clartistic, + * classpath-exception-2-0, clisp-exception-2-0, cnri-jython, cnri-python, + * cnri-python-gpl-compatible, condor-1-1, copyleft-next-0-3-0, + * copyleft-next-0-3-1, cpal-1-0, cpl-1-0, cpol-1-02, crossword, + * crystal-stacker, cua-opl-1-0, cube, c-uda-1-0, curl, d-fsl-1-0, diffmark, + * digirule-foss-exception, doc, dotseqn, drl-1-0, dsdp, dvipdfm, ecl-1-0, + * ecl-2-0, ecos-exception-2-0, efl-1-0, efl-2-0, egenix, entessa, epics, + * epl-1-0, epl-2-0, erlpl-1-1, etalab-2-0, eu-datagrid, eupl-1-0, eupl-1-1, + * eupl-1-2, eurosym, fair, fawkes-runtime-exception, fltk-exception, + * font-exception-2-0, frameworx-1-0, freebsd-doc, freeimage, + * freertos-exception-2-0, fsfap, fsful, fsfullr, ftl, gcc-exception-2-0, + * gcc-exception-3-1, gd, gfdl-1-1-invariants-only, + * gfdl-1-1-invariants-or-later, gfdl-1-1-no-invariants-only, + * gfdl-1-1-no-invariants-or-later, gfdl-1-1-only, gfdl-1-1-or-later, + * gfdl-1-2-invariants-only, gfdl-1-2-invariants-or-later, + * gfdl-1-2-no-invariants-only, gfdl-1-2-no-invariants-or-later, + * gfdl-1-2-only, gfdl-1-2-or-later, gfdl-1-3-invariants-only, + * gfdl-1-3-invariants-or-later, gfdl-1-3-no-invariants-only, + * gfdl-1-3-no-invariants-or-later, gfdl-1-3-only, gfdl-1-3-or-later, + * giftware, gl2ps, glide, glulxe, glwtpl, gnu-javamail-exception, gnuplot, + * gpl-1-0-only, gpl-1-0-or-later, gpl-2-0-only, gpl-2-0-or-later, + * gpl-3-0-linking-exception, gpl-3-0-linking-source-exception, + * gpl-3-0-only, gpl-3-0-or-later, gpl-cc-1-0, gsoap-1-3b, haskell-report, + * hippocratic-2-1, hpnd, hpnd-sell-variant, htmltidy, + * i2p-gpl-java-exception, ibm-pibs, icu, ijg, image-magick, imatix, imlib2, + * info-zip, intel, intel-acpi, interbase-1-0, ipa, ipl-1-0, isc, + * jasper-2-0, jpnic, json, lal-1-2, lal-1-3, latex2e, leptonica, + * lgpl-2-0-only, lgpl-2-0-or-later, lgpl-2-1-only, lgpl-2-1-or-later, + * lgpl-3-0-linking-exception, lgpl-3-0-only, lgpl-3-0-or-later, lgpllr, + * libpng, libpng-2-0, libselinux-1-0, libtiff, libtool-exception, + * liliq-p-1-1, liliq-r-1-1, liliq-rplus-1-1, linux-openib, + * linux-syscall-note, llvm-exception, lpl-1-0, lpl-1-02, lppl-1-0, + * lppl-1-1, lppl-1-2, lppl-1-3a, lppl-1-3c, lzma-exception, make-index, + * mif-exception, miros, mit, mit-0, mit-advertising, mit-cmu, mit-enna, + * mit-feh, mit-modern-variant, mitnfa, mit-open-group, motosoto, mpich2, + * mpl-1-0, mpl-1-1, mpl-2-0, mpl-2-0-no-copyleft-exception, ms-pl, ms-rl, + * mtll, mulanpsl-1-0, mulanpsl-2-0, multics, mup, naist-2003, nasa-1-3, + * naumen, nbpl-1-0, ncgl-uk-2-0, ncsa, netcdf, net-snmp, newsletr, ngpl, + * nist-pd, nist-pd-fallback, nlod-1-0, nlpl, nokia, nokia-qt-exception-1-1, + * nosl, noweb, npl-1-0, npl-1-1, nposl-3-0, nrl, ntp, ntp-0, + * ocaml-lgpl-linking-exception, occt-exception-1-0, occt-pl, oclc-2-0, + * odbl-1-0, odc-by-1-0, ofl-1-0, ofl-1-0-no-rfn, ofl-1-0-rfn, ofl-1-1, + * ofl-1-1-no-rfn, ofl-1-1-rfn, ogc-1-0, ogdl-taiwan-1-0, ogl-canada-2-0, + * ogl-uk-1-0, ogl-uk-2-0, ogl-uk-3-0, ogtsl, oldap-1-1, oldap-1-2, + * oldap-1-3, oldap-1-4, oldap-2-0, oldap-2-0-1, oldap-2-1, oldap-2-2, + * oldap-2-2-1, oldap-2-2-2, oldap-2-3, oldap-2-4, oldap-2-7, oml, + * openjdk-assembly-exception-1-0, openssl, openvpn-openssl-exception, + * opl-1-0, oset-pl-2-1, osl-1-0, osl-1-1, osl-2-0, osl-2-1, osl-3-0, + * o-uda-1-0, parity-6-0-0, parity-7-0-0, pddl-1-0, php-3-0, php-3-01, + * plexus, polyform-noncommercial-1-0-0, polyform-small-business-1-0-0, + * postgresql, psf-2-0, psfrag, ps-or-pdf-font-exception-20170817, psutils, + * python-2-0, qhull, qpl-1-0, qt-gpl-exception-1-0, qt-lgpl-exception-1-1, + * qwt-exception-1-0, rdisc, rhecos-1-1, rpl-1-1, rpsl-1-0, rsa-md, rscpl, + * ruby, saxpath, sax-pd, scea, sendmail, sendmail-8-23, sgi-b-1-0, + * sgi-b-1-1, sgi-b-2-0, shl-0-51, shl-2-0, shl-2-1, simpl-2-0, sissl, + * sissl-1-2, sleepycat, smlnj, smppl, snia, spencer-86, spencer-94, + * spencer-99, spl-1-0, ssh-openssh, ssh-short, sspl-1-0, sugarcrm-1-1-3, + * swift-exception, swl, tapr-ohl-1-0, tcl, tcp-wrappers, tmate, torque-1-1, + * tosl, tu-berlin-1-0, tu-berlin-2-0, u-boot-exception-2-0, ucl-1-0, + * unicode-dfs-2015, unicode-dfs-2016, unicode-tou, + * universal-foss-exception-1-0, unlicense, upl-1-0, vim, vostrom, vsl-1-0, + * w3c, w3c-19980720, w3c-20150513, watcom-1-0, wsuipa, wtfpl, + * wxwindows-exception-3-1, x11, xerox, xfree86-1-1, xinetd, xnet, xpp, + * xskat, ypl-1-0, ypl-1-1, zed, zend-2-0, zimbra-1-3, zimbra-1-4, zlib, + * zlib-acknowledgement, zpl-1-1, zpl-2-0, zpl-2-1. + * + * Generated from protobuf field string license = 3; + */ + protected $license = ''; + /** + * README template name. + * Valid template name(s) are: default. + * + * Generated from protobuf field string readme = 4; + */ + protected $readme = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $default_branch + * Default branch name of the repository. + * @type string[] $gitignores + * List of gitignore template names user can choose from. + * Valid values: actionscript, ada, agda, android, + * anjuta, ansible, appcelerator-titanium, app-engine, archives, + * arch-linux-packages, atmel-studio, autotools, backup, bazaar, bazel, + * bitrix, bricx-cc, c, cake-php, calabash, cf-wheels, chef-cookbook, + * clojure, cloud9, c-make, code-igniter, code-kit, code-sniffer, + * common-lisp, composer, concrete5, coq, cordova, cpp, craft-cms, cuda, + * cvs, d, dart, dart-editor, delphi, diff, dm, dreamweaver, dropbox, + * drupal, drupal-7, eagle, eclipse, eiffel-studio, elisp, elixir, elm, + * emacs, ensime, epi-server, erlang, esp-idf, espresso, exercism, + * expression-engine, ext-js, fancy, finale, flex-builder, force-dot-com, + * fortran, fuel-php, gcov, git-book, gnome-shell-extension, go, godot, gpg, + * gradle, grails, gwt, haskell, hugo, iar-ewarm, idris, igor-pro, images, + * infor-cms, java, jboss, jboss-4, jboss-6, jdeveloper, jekyll, + * jenkins-home, jenv, jet-brains, jigsaw, joomla, julia, jupyter-notebooks, + * kate, kdevelop4, kentico, ki-cad, kohana, kotlin, lab-view, laravel, + * lazarus, leiningen, lemon-stand, libre-office, lilypond, linux, lithium, + * logtalk, lua, lyx, mac-os, magento, magento-1, magento-2, matlab, maven, + * mercurial, mercury, metals, meta-programming-system, meteor, + * microsoft-office, model-sim, momentics, mono-develop, nanoc, net-beans, + * nikola, nim, ninja, node, notepad-pp, nwjs, objective--c, ocaml, octave, + * opa, open-cart, openssl, oracle-forms, otto, packer, patch, perl, perl6, + * phalcon, phoenix, pimcore, play-framework, plone, prestashop, processing, + * psoc-creator, puppet, pure-script, putty, python, qooxdoo, qt, r, racket, + * rails, raku, red, redcar, redis, rhodes-rhomobile, ros, ruby, rust, sam, + * sass, sbt, scala, scheme, scons, scrivener, sdcc, seam-gen, sketch-up, + * slick-edit, smalltalk, snap, splunk, stata, stella, sublime-text, + * sugar-crm, svn, swift, symfony, symphony-cms, synopsys-vcs, tags, + * terraform, tex, text-mate, textpattern, think-php, tortoise-git, + * turbo-gears-2, typo3, umbraco, unity, unreal-engine, vagrant, vim, + * virtual-env, virtuoso, visual-studio, visual-studio-code, vue, vvvv, waf, + * web-methods, windows, word-press, xcode, xilinx, xilinx-ise, xojo, + * yeoman, yii, zend-framework, zephir. + * @type string $license + * License template name user can choose from. + * Valid values: license-0bsd, license-389-exception, aal, abstyles, + * adobe-2006, adobe-glyph, adsl, afl-1-1, afl-1-2, afl-2-0, afl-2-1, + * afl-3-0, afmparse, agpl-1-0, agpl-1-0-only, agpl-1-0-or-later, + * agpl-3-0-only, agpl-3-0-or-later, aladdin, amdplpa, aml, ampas, antlr-pd, + * antlr-pd-fallback, apache-1-0, apache-1-1, apache-2-0, apafml, apl-1-0, + * apsl-1-0, apsl-1-1, apsl-1-2, apsl-2-0, artistic-1-0, artistic-1-0-cl8, + * artistic-1-0-perl, artistic-2-0, autoconf-exception-2-0, + * autoconf-exception-3-0, bahyph, barr, beerware, bison-exception-2-2, + * bittorrent-1-0, bittorrent-1-1, blessing, blueoak-1-0-0, + * bootloader-exception, borceux, bsd-1-clause, bsd-2-clause, + * bsd-2-clause-freebsd, bsd-2-clause-netbsd, bsd-2-clause-patent, + * bsd-2-clause-views, bsd-3-clause, bsd-3-clause-attribution, + * bsd-3-clause-clear, bsd-3-clause-lbnl, bsd-3-clause-modification, + * bsd-3-clause-no-nuclear-license, bsd-3-clause-no-nuclear-license-2014, + * bsd-3-clause-no-nuclear-warranty, bsd-3-clause-open-mpi, bsd-4-clause, + * bsd-4-clause-shortened, bsd-4-clause-uc, bsd-protection, bsd-source-code, + * bsl-1-0, busl-1-1, cal-1-0, cal-1-0-combined-work-exception, caldera, + * catosl-1-1, cc0-1-0, cc-by-1-0, cc-by-2-0, cc-by-3-0, cc-by-3-0-at, + * cc-by-3-0-us, cc-by-4-0, cc-by-nc-1-0, cc-by-nc-2-0, cc-by-nc-3-0, + * cc-by-nc-4-0, cc-by-nc-nd-1-0, cc-by-nc-nd-2-0, cc-by-nc-nd-3-0, + * cc-by-nc-nd-3-0-igo, cc-by-nc-nd-4-0, cc-by-nc-sa-1-0, cc-by-nc-sa-2-0, + * cc-by-nc-sa-3-0, cc-by-nc-sa-4-0, cc-by-nd-1-0, cc-by-nd-2-0, + * cc-by-nd-3-0, cc-by-nd-4-0, cc-by-sa-1-0, cc-by-sa-2-0, cc-by-sa-2-0-uk, + * cc-by-sa-2-1-jp, cc-by-sa-3-0, cc-by-sa-3-0-at, cc-by-sa-4-0, cc-pddc, + * cddl-1-0, cddl-1-1, cdla-permissive-1-0, cdla-sharing-1-0, cecill-1-0, + * cecill-1-1, cecill-2-0, cecill-2-1, cecill-b, cecill-c, cern-ohl-1-1, + * cern-ohl-1-2, cern-ohl-p-2-0, cern-ohl-s-2-0, cern-ohl-w-2-0, clartistic, + * classpath-exception-2-0, clisp-exception-2-0, cnri-jython, cnri-python, + * cnri-python-gpl-compatible, condor-1-1, copyleft-next-0-3-0, + * copyleft-next-0-3-1, cpal-1-0, cpl-1-0, cpol-1-02, crossword, + * crystal-stacker, cua-opl-1-0, cube, c-uda-1-0, curl, d-fsl-1-0, diffmark, + * digirule-foss-exception, doc, dotseqn, drl-1-0, dsdp, dvipdfm, ecl-1-0, + * ecl-2-0, ecos-exception-2-0, efl-1-0, efl-2-0, egenix, entessa, epics, + * epl-1-0, epl-2-0, erlpl-1-1, etalab-2-0, eu-datagrid, eupl-1-0, eupl-1-1, + * eupl-1-2, eurosym, fair, fawkes-runtime-exception, fltk-exception, + * font-exception-2-0, frameworx-1-0, freebsd-doc, freeimage, + * freertos-exception-2-0, fsfap, fsful, fsfullr, ftl, gcc-exception-2-0, + * gcc-exception-3-1, gd, gfdl-1-1-invariants-only, + * gfdl-1-1-invariants-or-later, gfdl-1-1-no-invariants-only, + * gfdl-1-1-no-invariants-or-later, gfdl-1-1-only, gfdl-1-1-or-later, + * gfdl-1-2-invariants-only, gfdl-1-2-invariants-or-later, + * gfdl-1-2-no-invariants-only, gfdl-1-2-no-invariants-or-later, + * gfdl-1-2-only, gfdl-1-2-or-later, gfdl-1-3-invariants-only, + * gfdl-1-3-invariants-or-later, gfdl-1-3-no-invariants-only, + * gfdl-1-3-no-invariants-or-later, gfdl-1-3-only, gfdl-1-3-or-later, + * giftware, gl2ps, glide, glulxe, glwtpl, gnu-javamail-exception, gnuplot, + * gpl-1-0-only, gpl-1-0-or-later, gpl-2-0-only, gpl-2-0-or-later, + * gpl-3-0-linking-exception, gpl-3-0-linking-source-exception, + * gpl-3-0-only, gpl-3-0-or-later, gpl-cc-1-0, gsoap-1-3b, haskell-report, + * hippocratic-2-1, hpnd, hpnd-sell-variant, htmltidy, + * i2p-gpl-java-exception, ibm-pibs, icu, ijg, image-magick, imatix, imlib2, + * info-zip, intel, intel-acpi, interbase-1-0, ipa, ipl-1-0, isc, + * jasper-2-0, jpnic, json, lal-1-2, lal-1-3, latex2e, leptonica, + * lgpl-2-0-only, lgpl-2-0-or-later, lgpl-2-1-only, lgpl-2-1-or-later, + * lgpl-3-0-linking-exception, lgpl-3-0-only, lgpl-3-0-or-later, lgpllr, + * libpng, libpng-2-0, libselinux-1-0, libtiff, libtool-exception, + * liliq-p-1-1, liliq-r-1-1, liliq-rplus-1-1, linux-openib, + * linux-syscall-note, llvm-exception, lpl-1-0, lpl-1-02, lppl-1-0, + * lppl-1-1, lppl-1-2, lppl-1-3a, lppl-1-3c, lzma-exception, make-index, + * mif-exception, miros, mit, mit-0, mit-advertising, mit-cmu, mit-enna, + * mit-feh, mit-modern-variant, mitnfa, mit-open-group, motosoto, mpich2, + * mpl-1-0, mpl-1-1, mpl-2-0, mpl-2-0-no-copyleft-exception, ms-pl, ms-rl, + * mtll, mulanpsl-1-0, mulanpsl-2-0, multics, mup, naist-2003, nasa-1-3, + * naumen, nbpl-1-0, ncgl-uk-2-0, ncsa, netcdf, net-snmp, newsletr, ngpl, + * nist-pd, nist-pd-fallback, nlod-1-0, nlpl, nokia, nokia-qt-exception-1-1, + * nosl, noweb, npl-1-0, npl-1-1, nposl-3-0, nrl, ntp, ntp-0, + * ocaml-lgpl-linking-exception, occt-exception-1-0, occt-pl, oclc-2-0, + * odbl-1-0, odc-by-1-0, ofl-1-0, ofl-1-0-no-rfn, ofl-1-0-rfn, ofl-1-1, + * ofl-1-1-no-rfn, ofl-1-1-rfn, ogc-1-0, ogdl-taiwan-1-0, ogl-canada-2-0, + * ogl-uk-1-0, ogl-uk-2-0, ogl-uk-3-0, ogtsl, oldap-1-1, oldap-1-2, + * oldap-1-3, oldap-1-4, oldap-2-0, oldap-2-0-1, oldap-2-1, oldap-2-2, + * oldap-2-2-1, oldap-2-2-2, oldap-2-3, oldap-2-4, oldap-2-7, oml, + * openjdk-assembly-exception-1-0, openssl, openvpn-openssl-exception, + * opl-1-0, oset-pl-2-1, osl-1-0, osl-1-1, osl-2-0, osl-2-1, osl-3-0, + * o-uda-1-0, parity-6-0-0, parity-7-0-0, pddl-1-0, php-3-0, php-3-01, + * plexus, polyform-noncommercial-1-0-0, polyform-small-business-1-0-0, + * postgresql, psf-2-0, psfrag, ps-or-pdf-font-exception-20170817, psutils, + * python-2-0, qhull, qpl-1-0, qt-gpl-exception-1-0, qt-lgpl-exception-1-1, + * qwt-exception-1-0, rdisc, rhecos-1-1, rpl-1-1, rpsl-1-0, rsa-md, rscpl, + * ruby, saxpath, sax-pd, scea, sendmail, sendmail-8-23, sgi-b-1-0, + * sgi-b-1-1, sgi-b-2-0, shl-0-51, shl-2-0, shl-2-1, simpl-2-0, sissl, + * sissl-1-2, sleepycat, smlnj, smppl, snia, spencer-86, spencer-94, + * spencer-99, spl-1-0, ssh-openssh, ssh-short, sspl-1-0, sugarcrm-1-1-3, + * swift-exception, swl, tapr-ohl-1-0, tcl, tcp-wrappers, tmate, torque-1-1, + * tosl, tu-berlin-1-0, tu-berlin-2-0, u-boot-exception-2-0, ucl-1-0, + * unicode-dfs-2015, unicode-dfs-2016, unicode-tou, + * universal-foss-exception-1-0, unlicense, upl-1-0, vim, vostrom, vsl-1-0, + * w3c, w3c-19980720, w3c-20150513, watcom-1-0, wsuipa, wtfpl, + * wxwindows-exception-3-1, x11, xerox, xfree86-1-1, xinetd, xnet, xpp, + * xskat, ypl-1-0, ypl-1-1, zed, zend-2-0, zimbra-1-3, zimbra-1-4, zlib, + * zlib-acknowledgement, zpl-1-1, zpl-2-0, zpl-2-1. + * @type string $readme + * README template name. + * Valid template name(s) are: default. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Default branch name of the repository. + * + * Generated from protobuf field string default_branch = 1; + * @return string + */ + public function getDefaultBranch() + { + return $this->default_branch; + } + + /** + * Default branch name of the repository. + * + * Generated from protobuf field string default_branch = 1; + * @param string $var + * @return $this + */ + public function setDefaultBranch($var) + { + GPBUtil::checkString($var, True); + $this->default_branch = $var; + + return $this; + } + + /** + * List of gitignore template names user can choose from. + * Valid values: actionscript, ada, agda, android, + * anjuta, ansible, appcelerator-titanium, app-engine, archives, + * arch-linux-packages, atmel-studio, autotools, backup, bazaar, bazel, + * bitrix, bricx-cc, c, cake-php, calabash, cf-wheels, chef-cookbook, + * clojure, cloud9, c-make, code-igniter, code-kit, code-sniffer, + * common-lisp, composer, concrete5, coq, cordova, cpp, craft-cms, cuda, + * cvs, d, dart, dart-editor, delphi, diff, dm, dreamweaver, dropbox, + * drupal, drupal-7, eagle, eclipse, eiffel-studio, elisp, elixir, elm, + * emacs, ensime, epi-server, erlang, esp-idf, espresso, exercism, + * expression-engine, ext-js, fancy, finale, flex-builder, force-dot-com, + * fortran, fuel-php, gcov, git-book, gnome-shell-extension, go, godot, gpg, + * gradle, grails, gwt, haskell, hugo, iar-ewarm, idris, igor-pro, images, + * infor-cms, java, jboss, jboss-4, jboss-6, jdeveloper, jekyll, + * jenkins-home, jenv, jet-brains, jigsaw, joomla, julia, jupyter-notebooks, + * kate, kdevelop4, kentico, ki-cad, kohana, kotlin, lab-view, laravel, + * lazarus, leiningen, lemon-stand, libre-office, lilypond, linux, lithium, + * logtalk, lua, lyx, mac-os, magento, magento-1, magento-2, matlab, maven, + * mercurial, mercury, metals, meta-programming-system, meteor, + * microsoft-office, model-sim, momentics, mono-develop, nanoc, net-beans, + * nikola, nim, ninja, node, notepad-pp, nwjs, objective--c, ocaml, octave, + * opa, open-cart, openssl, oracle-forms, otto, packer, patch, perl, perl6, + * phalcon, phoenix, pimcore, play-framework, plone, prestashop, processing, + * psoc-creator, puppet, pure-script, putty, python, qooxdoo, qt, r, racket, + * rails, raku, red, redcar, redis, rhodes-rhomobile, ros, ruby, rust, sam, + * sass, sbt, scala, scheme, scons, scrivener, sdcc, seam-gen, sketch-up, + * slick-edit, smalltalk, snap, splunk, stata, stella, sublime-text, + * sugar-crm, svn, swift, symfony, symphony-cms, synopsys-vcs, tags, + * terraform, tex, text-mate, textpattern, think-php, tortoise-git, + * turbo-gears-2, typo3, umbraco, unity, unreal-engine, vagrant, vim, + * virtual-env, virtuoso, visual-studio, visual-studio-code, vue, vvvv, waf, + * web-methods, windows, word-press, xcode, xilinx, xilinx-ise, xojo, + * yeoman, yii, zend-framework, zephir. + * + * Generated from protobuf field repeated string gitignores = 2; + * @return RepeatedField + */ + public function getGitignores() + { + return $this->gitignores; + } + + /** + * List of gitignore template names user can choose from. + * Valid values: actionscript, ada, agda, android, + * anjuta, ansible, appcelerator-titanium, app-engine, archives, + * arch-linux-packages, atmel-studio, autotools, backup, bazaar, bazel, + * bitrix, bricx-cc, c, cake-php, calabash, cf-wheels, chef-cookbook, + * clojure, cloud9, c-make, code-igniter, code-kit, code-sniffer, + * common-lisp, composer, concrete5, coq, cordova, cpp, craft-cms, cuda, + * cvs, d, dart, dart-editor, delphi, diff, dm, dreamweaver, dropbox, + * drupal, drupal-7, eagle, eclipse, eiffel-studio, elisp, elixir, elm, + * emacs, ensime, epi-server, erlang, esp-idf, espresso, exercism, + * expression-engine, ext-js, fancy, finale, flex-builder, force-dot-com, + * fortran, fuel-php, gcov, git-book, gnome-shell-extension, go, godot, gpg, + * gradle, grails, gwt, haskell, hugo, iar-ewarm, idris, igor-pro, images, + * infor-cms, java, jboss, jboss-4, jboss-6, jdeveloper, jekyll, + * jenkins-home, jenv, jet-brains, jigsaw, joomla, julia, jupyter-notebooks, + * kate, kdevelop4, kentico, ki-cad, kohana, kotlin, lab-view, laravel, + * lazarus, leiningen, lemon-stand, libre-office, lilypond, linux, lithium, + * logtalk, lua, lyx, mac-os, magento, magento-1, magento-2, matlab, maven, + * mercurial, mercury, metals, meta-programming-system, meteor, + * microsoft-office, model-sim, momentics, mono-develop, nanoc, net-beans, + * nikola, nim, ninja, node, notepad-pp, nwjs, objective--c, ocaml, octave, + * opa, open-cart, openssl, oracle-forms, otto, packer, patch, perl, perl6, + * phalcon, phoenix, pimcore, play-framework, plone, prestashop, processing, + * psoc-creator, puppet, pure-script, putty, python, qooxdoo, qt, r, racket, + * rails, raku, red, redcar, redis, rhodes-rhomobile, ros, ruby, rust, sam, + * sass, sbt, scala, scheme, scons, scrivener, sdcc, seam-gen, sketch-up, + * slick-edit, smalltalk, snap, splunk, stata, stella, sublime-text, + * sugar-crm, svn, swift, symfony, symphony-cms, synopsys-vcs, tags, + * terraform, tex, text-mate, textpattern, think-php, tortoise-git, + * turbo-gears-2, typo3, umbraco, unity, unreal-engine, vagrant, vim, + * virtual-env, virtuoso, visual-studio, visual-studio-code, vue, vvvv, waf, + * web-methods, windows, word-press, xcode, xilinx, xilinx-ise, xojo, + * yeoman, yii, zend-framework, zephir. + * + * Generated from protobuf field repeated string gitignores = 2; + * @param string[] $var + * @return $this + */ + public function setGitignores($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->gitignores = $arr; + + return $this; + } + + /** + * License template name user can choose from. + * Valid values: license-0bsd, license-389-exception, aal, abstyles, + * adobe-2006, adobe-glyph, adsl, afl-1-1, afl-1-2, afl-2-0, afl-2-1, + * afl-3-0, afmparse, agpl-1-0, agpl-1-0-only, agpl-1-0-or-later, + * agpl-3-0-only, agpl-3-0-or-later, aladdin, amdplpa, aml, ampas, antlr-pd, + * antlr-pd-fallback, apache-1-0, apache-1-1, apache-2-0, apafml, apl-1-0, + * apsl-1-0, apsl-1-1, apsl-1-2, apsl-2-0, artistic-1-0, artistic-1-0-cl8, + * artistic-1-0-perl, artistic-2-0, autoconf-exception-2-0, + * autoconf-exception-3-0, bahyph, barr, beerware, bison-exception-2-2, + * bittorrent-1-0, bittorrent-1-1, blessing, blueoak-1-0-0, + * bootloader-exception, borceux, bsd-1-clause, bsd-2-clause, + * bsd-2-clause-freebsd, bsd-2-clause-netbsd, bsd-2-clause-patent, + * bsd-2-clause-views, bsd-3-clause, bsd-3-clause-attribution, + * bsd-3-clause-clear, bsd-3-clause-lbnl, bsd-3-clause-modification, + * bsd-3-clause-no-nuclear-license, bsd-3-clause-no-nuclear-license-2014, + * bsd-3-clause-no-nuclear-warranty, bsd-3-clause-open-mpi, bsd-4-clause, + * bsd-4-clause-shortened, bsd-4-clause-uc, bsd-protection, bsd-source-code, + * bsl-1-0, busl-1-1, cal-1-0, cal-1-0-combined-work-exception, caldera, + * catosl-1-1, cc0-1-0, cc-by-1-0, cc-by-2-0, cc-by-3-0, cc-by-3-0-at, + * cc-by-3-0-us, cc-by-4-0, cc-by-nc-1-0, cc-by-nc-2-0, cc-by-nc-3-0, + * cc-by-nc-4-0, cc-by-nc-nd-1-0, cc-by-nc-nd-2-0, cc-by-nc-nd-3-0, + * cc-by-nc-nd-3-0-igo, cc-by-nc-nd-4-0, cc-by-nc-sa-1-0, cc-by-nc-sa-2-0, + * cc-by-nc-sa-3-0, cc-by-nc-sa-4-0, cc-by-nd-1-0, cc-by-nd-2-0, + * cc-by-nd-3-0, cc-by-nd-4-0, cc-by-sa-1-0, cc-by-sa-2-0, cc-by-sa-2-0-uk, + * cc-by-sa-2-1-jp, cc-by-sa-3-0, cc-by-sa-3-0-at, cc-by-sa-4-0, cc-pddc, + * cddl-1-0, cddl-1-1, cdla-permissive-1-0, cdla-sharing-1-0, cecill-1-0, + * cecill-1-1, cecill-2-0, cecill-2-1, cecill-b, cecill-c, cern-ohl-1-1, + * cern-ohl-1-2, cern-ohl-p-2-0, cern-ohl-s-2-0, cern-ohl-w-2-0, clartistic, + * classpath-exception-2-0, clisp-exception-2-0, cnri-jython, cnri-python, + * cnri-python-gpl-compatible, condor-1-1, copyleft-next-0-3-0, + * copyleft-next-0-3-1, cpal-1-0, cpl-1-0, cpol-1-02, crossword, + * crystal-stacker, cua-opl-1-0, cube, c-uda-1-0, curl, d-fsl-1-0, diffmark, + * digirule-foss-exception, doc, dotseqn, drl-1-0, dsdp, dvipdfm, ecl-1-0, + * ecl-2-0, ecos-exception-2-0, efl-1-0, efl-2-0, egenix, entessa, epics, + * epl-1-0, epl-2-0, erlpl-1-1, etalab-2-0, eu-datagrid, eupl-1-0, eupl-1-1, + * eupl-1-2, eurosym, fair, fawkes-runtime-exception, fltk-exception, + * font-exception-2-0, frameworx-1-0, freebsd-doc, freeimage, + * freertos-exception-2-0, fsfap, fsful, fsfullr, ftl, gcc-exception-2-0, + * gcc-exception-3-1, gd, gfdl-1-1-invariants-only, + * gfdl-1-1-invariants-or-later, gfdl-1-1-no-invariants-only, + * gfdl-1-1-no-invariants-or-later, gfdl-1-1-only, gfdl-1-1-or-later, + * gfdl-1-2-invariants-only, gfdl-1-2-invariants-or-later, + * gfdl-1-2-no-invariants-only, gfdl-1-2-no-invariants-or-later, + * gfdl-1-2-only, gfdl-1-2-or-later, gfdl-1-3-invariants-only, + * gfdl-1-3-invariants-or-later, gfdl-1-3-no-invariants-only, + * gfdl-1-3-no-invariants-or-later, gfdl-1-3-only, gfdl-1-3-or-later, + * giftware, gl2ps, glide, glulxe, glwtpl, gnu-javamail-exception, gnuplot, + * gpl-1-0-only, gpl-1-0-or-later, gpl-2-0-only, gpl-2-0-or-later, + * gpl-3-0-linking-exception, gpl-3-0-linking-source-exception, + * gpl-3-0-only, gpl-3-0-or-later, gpl-cc-1-0, gsoap-1-3b, haskell-report, + * hippocratic-2-1, hpnd, hpnd-sell-variant, htmltidy, + * i2p-gpl-java-exception, ibm-pibs, icu, ijg, image-magick, imatix, imlib2, + * info-zip, intel, intel-acpi, interbase-1-0, ipa, ipl-1-0, isc, + * jasper-2-0, jpnic, json, lal-1-2, lal-1-3, latex2e, leptonica, + * lgpl-2-0-only, lgpl-2-0-or-later, lgpl-2-1-only, lgpl-2-1-or-later, + * lgpl-3-0-linking-exception, lgpl-3-0-only, lgpl-3-0-or-later, lgpllr, + * libpng, libpng-2-0, libselinux-1-0, libtiff, libtool-exception, + * liliq-p-1-1, liliq-r-1-1, liliq-rplus-1-1, linux-openib, + * linux-syscall-note, llvm-exception, lpl-1-0, lpl-1-02, lppl-1-0, + * lppl-1-1, lppl-1-2, lppl-1-3a, lppl-1-3c, lzma-exception, make-index, + * mif-exception, miros, mit, mit-0, mit-advertising, mit-cmu, mit-enna, + * mit-feh, mit-modern-variant, mitnfa, mit-open-group, motosoto, mpich2, + * mpl-1-0, mpl-1-1, mpl-2-0, mpl-2-0-no-copyleft-exception, ms-pl, ms-rl, + * mtll, mulanpsl-1-0, mulanpsl-2-0, multics, mup, naist-2003, nasa-1-3, + * naumen, nbpl-1-0, ncgl-uk-2-0, ncsa, netcdf, net-snmp, newsletr, ngpl, + * nist-pd, nist-pd-fallback, nlod-1-0, nlpl, nokia, nokia-qt-exception-1-1, + * nosl, noweb, npl-1-0, npl-1-1, nposl-3-0, nrl, ntp, ntp-0, + * ocaml-lgpl-linking-exception, occt-exception-1-0, occt-pl, oclc-2-0, + * odbl-1-0, odc-by-1-0, ofl-1-0, ofl-1-0-no-rfn, ofl-1-0-rfn, ofl-1-1, + * ofl-1-1-no-rfn, ofl-1-1-rfn, ogc-1-0, ogdl-taiwan-1-0, ogl-canada-2-0, + * ogl-uk-1-0, ogl-uk-2-0, ogl-uk-3-0, ogtsl, oldap-1-1, oldap-1-2, + * oldap-1-3, oldap-1-4, oldap-2-0, oldap-2-0-1, oldap-2-1, oldap-2-2, + * oldap-2-2-1, oldap-2-2-2, oldap-2-3, oldap-2-4, oldap-2-7, oml, + * openjdk-assembly-exception-1-0, openssl, openvpn-openssl-exception, + * opl-1-0, oset-pl-2-1, osl-1-0, osl-1-1, osl-2-0, osl-2-1, osl-3-0, + * o-uda-1-0, parity-6-0-0, parity-7-0-0, pddl-1-0, php-3-0, php-3-01, + * plexus, polyform-noncommercial-1-0-0, polyform-small-business-1-0-0, + * postgresql, psf-2-0, psfrag, ps-or-pdf-font-exception-20170817, psutils, + * python-2-0, qhull, qpl-1-0, qt-gpl-exception-1-0, qt-lgpl-exception-1-1, + * qwt-exception-1-0, rdisc, rhecos-1-1, rpl-1-1, rpsl-1-0, rsa-md, rscpl, + * ruby, saxpath, sax-pd, scea, sendmail, sendmail-8-23, sgi-b-1-0, + * sgi-b-1-1, sgi-b-2-0, shl-0-51, shl-2-0, shl-2-1, simpl-2-0, sissl, + * sissl-1-2, sleepycat, smlnj, smppl, snia, spencer-86, spencer-94, + * spencer-99, spl-1-0, ssh-openssh, ssh-short, sspl-1-0, sugarcrm-1-1-3, + * swift-exception, swl, tapr-ohl-1-0, tcl, tcp-wrappers, tmate, torque-1-1, + * tosl, tu-berlin-1-0, tu-berlin-2-0, u-boot-exception-2-0, ucl-1-0, + * unicode-dfs-2015, unicode-dfs-2016, unicode-tou, + * universal-foss-exception-1-0, unlicense, upl-1-0, vim, vostrom, vsl-1-0, + * w3c, w3c-19980720, w3c-20150513, watcom-1-0, wsuipa, wtfpl, + * wxwindows-exception-3-1, x11, xerox, xfree86-1-1, xinetd, xnet, xpp, + * xskat, ypl-1-0, ypl-1-1, zed, zend-2-0, zimbra-1-3, zimbra-1-4, zlib, + * zlib-acknowledgement, zpl-1-1, zpl-2-0, zpl-2-1. + * + * Generated from protobuf field string license = 3; + * @return string + */ + public function getLicense() + { + return $this->license; + } + + /** + * License template name user can choose from. + * Valid values: license-0bsd, license-389-exception, aal, abstyles, + * adobe-2006, adobe-glyph, adsl, afl-1-1, afl-1-2, afl-2-0, afl-2-1, + * afl-3-0, afmparse, agpl-1-0, agpl-1-0-only, agpl-1-0-or-later, + * agpl-3-0-only, agpl-3-0-or-later, aladdin, amdplpa, aml, ampas, antlr-pd, + * antlr-pd-fallback, apache-1-0, apache-1-1, apache-2-0, apafml, apl-1-0, + * apsl-1-0, apsl-1-1, apsl-1-2, apsl-2-0, artistic-1-0, artistic-1-0-cl8, + * artistic-1-0-perl, artistic-2-0, autoconf-exception-2-0, + * autoconf-exception-3-0, bahyph, barr, beerware, bison-exception-2-2, + * bittorrent-1-0, bittorrent-1-1, blessing, blueoak-1-0-0, + * bootloader-exception, borceux, bsd-1-clause, bsd-2-clause, + * bsd-2-clause-freebsd, bsd-2-clause-netbsd, bsd-2-clause-patent, + * bsd-2-clause-views, bsd-3-clause, bsd-3-clause-attribution, + * bsd-3-clause-clear, bsd-3-clause-lbnl, bsd-3-clause-modification, + * bsd-3-clause-no-nuclear-license, bsd-3-clause-no-nuclear-license-2014, + * bsd-3-clause-no-nuclear-warranty, bsd-3-clause-open-mpi, bsd-4-clause, + * bsd-4-clause-shortened, bsd-4-clause-uc, bsd-protection, bsd-source-code, + * bsl-1-0, busl-1-1, cal-1-0, cal-1-0-combined-work-exception, caldera, + * catosl-1-1, cc0-1-0, cc-by-1-0, cc-by-2-0, cc-by-3-0, cc-by-3-0-at, + * cc-by-3-0-us, cc-by-4-0, cc-by-nc-1-0, cc-by-nc-2-0, cc-by-nc-3-0, + * cc-by-nc-4-0, cc-by-nc-nd-1-0, cc-by-nc-nd-2-0, cc-by-nc-nd-3-0, + * cc-by-nc-nd-3-0-igo, cc-by-nc-nd-4-0, cc-by-nc-sa-1-0, cc-by-nc-sa-2-0, + * cc-by-nc-sa-3-0, cc-by-nc-sa-4-0, cc-by-nd-1-0, cc-by-nd-2-0, + * cc-by-nd-3-0, cc-by-nd-4-0, cc-by-sa-1-0, cc-by-sa-2-0, cc-by-sa-2-0-uk, + * cc-by-sa-2-1-jp, cc-by-sa-3-0, cc-by-sa-3-0-at, cc-by-sa-4-0, cc-pddc, + * cddl-1-0, cddl-1-1, cdla-permissive-1-0, cdla-sharing-1-0, cecill-1-0, + * cecill-1-1, cecill-2-0, cecill-2-1, cecill-b, cecill-c, cern-ohl-1-1, + * cern-ohl-1-2, cern-ohl-p-2-0, cern-ohl-s-2-0, cern-ohl-w-2-0, clartistic, + * classpath-exception-2-0, clisp-exception-2-0, cnri-jython, cnri-python, + * cnri-python-gpl-compatible, condor-1-1, copyleft-next-0-3-0, + * copyleft-next-0-3-1, cpal-1-0, cpl-1-0, cpol-1-02, crossword, + * crystal-stacker, cua-opl-1-0, cube, c-uda-1-0, curl, d-fsl-1-0, diffmark, + * digirule-foss-exception, doc, dotseqn, drl-1-0, dsdp, dvipdfm, ecl-1-0, + * ecl-2-0, ecos-exception-2-0, efl-1-0, efl-2-0, egenix, entessa, epics, + * epl-1-0, epl-2-0, erlpl-1-1, etalab-2-0, eu-datagrid, eupl-1-0, eupl-1-1, + * eupl-1-2, eurosym, fair, fawkes-runtime-exception, fltk-exception, + * font-exception-2-0, frameworx-1-0, freebsd-doc, freeimage, + * freertos-exception-2-0, fsfap, fsful, fsfullr, ftl, gcc-exception-2-0, + * gcc-exception-3-1, gd, gfdl-1-1-invariants-only, + * gfdl-1-1-invariants-or-later, gfdl-1-1-no-invariants-only, + * gfdl-1-1-no-invariants-or-later, gfdl-1-1-only, gfdl-1-1-or-later, + * gfdl-1-2-invariants-only, gfdl-1-2-invariants-or-later, + * gfdl-1-2-no-invariants-only, gfdl-1-2-no-invariants-or-later, + * gfdl-1-2-only, gfdl-1-2-or-later, gfdl-1-3-invariants-only, + * gfdl-1-3-invariants-or-later, gfdl-1-3-no-invariants-only, + * gfdl-1-3-no-invariants-or-later, gfdl-1-3-only, gfdl-1-3-or-later, + * giftware, gl2ps, glide, glulxe, glwtpl, gnu-javamail-exception, gnuplot, + * gpl-1-0-only, gpl-1-0-or-later, gpl-2-0-only, gpl-2-0-or-later, + * gpl-3-0-linking-exception, gpl-3-0-linking-source-exception, + * gpl-3-0-only, gpl-3-0-or-later, gpl-cc-1-0, gsoap-1-3b, haskell-report, + * hippocratic-2-1, hpnd, hpnd-sell-variant, htmltidy, + * i2p-gpl-java-exception, ibm-pibs, icu, ijg, image-magick, imatix, imlib2, + * info-zip, intel, intel-acpi, interbase-1-0, ipa, ipl-1-0, isc, + * jasper-2-0, jpnic, json, lal-1-2, lal-1-3, latex2e, leptonica, + * lgpl-2-0-only, lgpl-2-0-or-later, lgpl-2-1-only, lgpl-2-1-or-later, + * lgpl-3-0-linking-exception, lgpl-3-0-only, lgpl-3-0-or-later, lgpllr, + * libpng, libpng-2-0, libselinux-1-0, libtiff, libtool-exception, + * liliq-p-1-1, liliq-r-1-1, liliq-rplus-1-1, linux-openib, + * linux-syscall-note, llvm-exception, lpl-1-0, lpl-1-02, lppl-1-0, + * lppl-1-1, lppl-1-2, lppl-1-3a, lppl-1-3c, lzma-exception, make-index, + * mif-exception, miros, mit, mit-0, mit-advertising, mit-cmu, mit-enna, + * mit-feh, mit-modern-variant, mitnfa, mit-open-group, motosoto, mpich2, + * mpl-1-0, mpl-1-1, mpl-2-0, mpl-2-0-no-copyleft-exception, ms-pl, ms-rl, + * mtll, mulanpsl-1-0, mulanpsl-2-0, multics, mup, naist-2003, nasa-1-3, + * naumen, nbpl-1-0, ncgl-uk-2-0, ncsa, netcdf, net-snmp, newsletr, ngpl, + * nist-pd, nist-pd-fallback, nlod-1-0, nlpl, nokia, nokia-qt-exception-1-1, + * nosl, noweb, npl-1-0, npl-1-1, nposl-3-0, nrl, ntp, ntp-0, + * ocaml-lgpl-linking-exception, occt-exception-1-0, occt-pl, oclc-2-0, + * odbl-1-0, odc-by-1-0, ofl-1-0, ofl-1-0-no-rfn, ofl-1-0-rfn, ofl-1-1, + * ofl-1-1-no-rfn, ofl-1-1-rfn, ogc-1-0, ogdl-taiwan-1-0, ogl-canada-2-0, + * ogl-uk-1-0, ogl-uk-2-0, ogl-uk-3-0, ogtsl, oldap-1-1, oldap-1-2, + * oldap-1-3, oldap-1-4, oldap-2-0, oldap-2-0-1, oldap-2-1, oldap-2-2, + * oldap-2-2-1, oldap-2-2-2, oldap-2-3, oldap-2-4, oldap-2-7, oml, + * openjdk-assembly-exception-1-0, openssl, openvpn-openssl-exception, + * opl-1-0, oset-pl-2-1, osl-1-0, osl-1-1, osl-2-0, osl-2-1, osl-3-0, + * o-uda-1-0, parity-6-0-0, parity-7-0-0, pddl-1-0, php-3-0, php-3-01, + * plexus, polyform-noncommercial-1-0-0, polyform-small-business-1-0-0, + * postgresql, psf-2-0, psfrag, ps-or-pdf-font-exception-20170817, psutils, + * python-2-0, qhull, qpl-1-0, qt-gpl-exception-1-0, qt-lgpl-exception-1-1, + * qwt-exception-1-0, rdisc, rhecos-1-1, rpl-1-1, rpsl-1-0, rsa-md, rscpl, + * ruby, saxpath, sax-pd, scea, sendmail, sendmail-8-23, sgi-b-1-0, + * sgi-b-1-1, sgi-b-2-0, shl-0-51, shl-2-0, shl-2-1, simpl-2-0, sissl, + * sissl-1-2, sleepycat, smlnj, smppl, snia, spencer-86, spencer-94, + * spencer-99, spl-1-0, ssh-openssh, ssh-short, sspl-1-0, sugarcrm-1-1-3, + * swift-exception, swl, tapr-ohl-1-0, tcl, tcp-wrappers, tmate, torque-1-1, + * tosl, tu-berlin-1-0, tu-berlin-2-0, u-boot-exception-2-0, ucl-1-0, + * unicode-dfs-2015, unicode-dfs-2016, unicode-tou, + * universal-foss-exception-1-0, unlicense, upl-1-0, vim, vostrom, vsl-1-0, + * w3c, w3c-19980720, w3c-20150513, watcom-1-0, wsuipa, wtfpl, + * wxwindows-exception-3-1, x11, xerox, xfree86-1-1, xinetd, xnet, xpp, + * xskat, ypl-1-0, ypl-1-1, zed, zend-2-0, zimbra-1-3, zimbra-1-4, zlib, + * zlib-acknowledgement, zpl-1-1, zpl-2-0, zpl-2-1. + * + * Generated from protobuf field string license = 3; + * @param string $var + * @return $this + */ + public function setLicense($var) + { + GPBUtil::checkString($var, True); + $this->license = $var; + + return $this; + } + + /** + * README template name. + * Valid template name(s) are: default. + * + * Generated from protobuf field string readme = 4; + * @return string + */ + public function getReadme() + { + return $this->readme; + } + + /** + * README template name. + * Valid template name(s) are: default. + * + * Generated from protobuf field string readme = 4; + * @param string $var + * @return $this + */ + public function setReadme($var) + { + GPBUtil::checkString($var, True); + $this->readme = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Repository/URIs.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Repository/URIs.php new file mode 100644 index 000000000000..783f08e94825 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Repository/URIs.php @@ -0,0 +1,139 @@ +google.cloud.securesourcemanager.v1.Repository.URIs + */ +class URIs extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. HTML is the URI for user to view the repository in a + * browser. + * + * Generated from protobuf field string html = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $html = ''; + /** + * Output only. git_https is the git HTTPS URI for git operations. + * + * Generated from protobuf field string git_https = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $git_https = ''; + /** + * Output only. API is the URI for API access. + * + * Generated from protobuf field string api = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $html + * Output only. HTML is the URI for user to view the repository in a + * browser. + * @type string $git_https + * Output only. git_https is the git HTTPS URI for git operations. + * @type string $api + * Output only. API is the URI for API access. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Output only. HTML is the URI for user to view the repository in a + * browser. + * + * Generated from protobuf field string html = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getHtml() + { + return $this->html; + } + + /** + * Output only. HTML is the URI for user to view the repository in a + * browser. + * + * Generated from protobuf field string html = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setHtml($var) + { + GPBUtil::checkString($var, True); + $this->html = $var; + + return $this; + } + + /** + * Output only. git_https is the git HTTPS URI for git operations. + * + * Generated from protobuf field string git_https = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getGitHttps() + { + return $this->git_https; + } + + /** + * Output only. git_https is the git HTTPS URI for git operations. + * + * Generated from protobuf field string git_https = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setGitHttps($var) + { + GPBUtil::checkString($var, True); + $this->git_https = $var; + + return $this; + } + + /** + * Output only. API is the URI for API access. + * + * Generated from protobuf field string api = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApi() + { + return $this->api; + } + + /** + * Output only. API is the URI for API access. + * + * Generated from protobuf field string api = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApi($var) + { + GPBUtil::checkString($var, True); + $this->api = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ResolvePullRequestCommentsRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ResolvePullRequestCommentsRequest.php new file mode 100644 index 000000000000..7910b99e4a00 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ResolvePullRequestCommentsRequest.php @@ -0,0 +1,180 @@ +google.cloud.securesourcemanager.v1.ResolvePullRequestCommentsRequest + */ +class ResolvePullRequestCommentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * 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}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * 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. + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $names; + /** + * Optional. If set, at least one comment in a thread is required, rest of the + * comments in the same thread will be automatically updated to resolved. If + * unset, all comments in the same thread need be present. + * + * Generated from protobuf field bool auto_fill = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $auto_fill = false; + + /** + * @param string $parent 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}` + * Please see {@see SecureSourceManagerClient::pullRequestName()} for help formatting this field. + * @param string[] $names 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. Please see + * {@see SecureSourceManagerClient::pullRequestCommentName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\ResolvePullRequestCommentsRequest + * + * @experimental + */ + public static function build(string $parent, array $names): self + { + return (new self()) + ->setParent($parent) + ->setNames($names); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * 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}` + * @type string[] $names + * 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. + * @type bool $auto_fill + * Optional. If set, at least one comment in a thread is required, rest of the + * comments in the same thread will be automatically updated to resolved. If + * unset, all comments in the same thread need be present. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * 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}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * 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}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * 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. + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * 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. + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string[] $var + * @return $this + */ + public function setNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->names = $arr; + + return $this; + } + + /** + * Optional. If set, at least one comment in a thread is required, rest of the + * comments in the same thread will be automatically updated to resolved. If + * unset, all comments in the same thread need be present. + * + * Generated from protobuf field bool auto_fill = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAutoFill() + { + return $this->auto_fill; + } + + /** + * Optional. If set, at least one comment in a thread is required, rest of the + * comments in the same thread will be automatically updated to resolved. If + * unset, all comments in the same thread need be present. + * + * Generated from protobuf field bool auto_fill = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAutoFill($var) + { + GPBUtil::checkBool($var); + $this->auto_fill = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ResolvePullRequestCommentsResponse.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ResolvePullRequestCommentsResponse.php new file mode 100644 index 000000000000..a65e12a5b119 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ResolvePullRequestCommentsResponse.php @@ -0,0 +1,67 @@ +google.cloud.securesourcemanager.v1.ResolvePullRequestCommentsResponse + */ +class ResolvePullRequestCommentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of pull request comments resolved. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comments = 1; + */ + private $pull_request_comments; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecureSourceManager\V1\PullRequestComment[] $pull_request_comments + * The list of pull request comments resolved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * The list of pull request comments resolved. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comments = 1; + * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\PullRequestComment> + */ + public function getPullRequestComments() + { + return $this->pull_request_comments; + } + + /** + * The list of pull request comments resolved. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comments = 1; + * @param \Google\Cloud\SecureSourceManager\V1\PullRequestComment[] $var + * @return $this + */ + public function setPullRequestComments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\PullRequestComment::class); + $this->pull_request_comments = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/TreeEntry.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/TreeEntry.php new file mode 100644 index 000000000000..9887c977bb12 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/TreeEntry.php @@ -0,0 +1,211 @@ +google.cloud.securesourcemanager.v1.TreeEntry + */ +class TreeEntry extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The type of the object (TREE, BLOB, COMMIT). Output-only. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.TreeEntry.ObjectType type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $type = 0; + /** + * Output only. The SHA-1 hash of the object (unique identifier). Output-only. + * + * Generated from protobuf field string sha = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $sha = ''; + /** + * Output only. The path of the file or directory within the tree (e.g., + * "src/main/java/MyClass.java"). Output-only. + * + * Generated from protobuf field string path = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $path = ''; + /** + * Output only. The file mode as a string (e.g., "100644"). Indicates file + * type. Output-only. + * + * Generated from protobuf field string mode = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $mode = ''; + /** + * Output only. The size of the object in bytes (only for blobs). Output-only. + * + * Generated from protobuf field int64 size = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Output only. The type of the object (TREE, BLOB, COMMIT). Output-only. + * @type string $sha + * Output only. The SHA-1 hash of the object (unique identifier). Output-only. + * @type string $path + * Output only. The path of the file or directory within the tree (e.g., + * "src/main/java/MyClass.java"). Output-only. + * @type string $mode + * Output only. The file mode as a string (e.g., "100644"). Indicates file + * type. Output-only. + * @type int|string $size + * Output only. The size of the object in bytes (only for blobs). Output-only. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The type of the object (TREE, BLOB, COMMIT). Output-only. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.TreeEntry.ObjectType type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Output only. The type of the object (TREE, BLOB, COMMIT). Output-only. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.TreeEntry.ObjectType type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\SecureSourceManager\V1\TreeEntry\ObjectType::class); + $this->type = $var; + + return $this; + } + + /** + * Output only. The SHA-1 hash of the object (unique identifier). Output-only. + * + * Generated from protobuf field string sha = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSha() + { + return $this->sha; + } + + /** + * Output only. The SHA-1 hash of the object (unique identifier). Output-only. + * + * Generated from protobuf field string sha = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSha($var) + { + GPBUtil::checkString($var, True); + $this->sha = $var; + + return $this; + } + + /** + * Output only. The path of the file or directory within the tree (e.g., + * "src/main/java/MyClass.java"). Output-only. + * + * Generated from protobuf field string path = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Output only. The path of the file or directory within the tree (e.g., + * "src/main/java/MyClass.java"). Output-only. + * + * Generated from protobuf field string path = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->path = $var; + + return $this; + } + + /** + * Output only. The file mode as a string (e.g., "100644"). Indicates file + * type. Output-only. + * + * Generated from protobuf field string mode = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getMode() + { + return $this->mode; + } + + /** + * Output only. The file mode as a string (e.g., "100644"). Indicates file + * type. Output-only. + * + * Generated from protobuf field string mode = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkString($var, True); + $this->mode = $var; + + return $this; + } + + /** + * Output only. The size of the object in bytes (only for blobs). Output-only. + * + * Generated from protobuf field int64 size = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getSize() + { + return $this->size; + } + + /** + * Output only. The size of the object in bytes (only for blobs). Output-only. + * + * Generated from protobuf field int64 size = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setSize($var) + { + GPBUtil::checkInt64($var); + $this->size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/TreeEntry/ObjectType.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/TreeEntry/ObjectType.php new file mode 100644 index 000000000000..443a8d7d7a6b --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/TreeEntry/ObjectType.php @@ -0,0 +1,68 @@ +google.cloud.securesourcemanager.v1.TreeEntry.ObjectType + */ +class ObjectType +{ + /** + * Default value, indicating the object type is unspecified. + * + * Generated from protobuf enum OBJECT_TYPE_UNSPECIFIED = 0; + */ + const OBJECT_TYPE_UNSPECIFIED = 0; + /** + * Represents a directory (folder). + * + * Generated from protobuf enum TREE = 1; + */ + const TREE = 1; + /** + * Represents a file (contains file data). + * + * Generated from protobuf enum BLOB = 2; + */ + const BLOB = 2; + /** + * Represents a pointer to another repository (submodule). + * + * Generated from protobuf enum COMMIT = 3; + */ + const COMMIT = 3; + + private static $valueToName = [ + self::OBJECT_TYPE_UNSPECIFIED => 'OBJECT_TYPE_UNSPECIFIED', + self::TREE => 'TREE', + self::BLOB => 'BLOB', + self::COMMIT => 'COMMIT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UnresolvePullRequestCommentsRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UnresolvePullRequestCommentsRequest.php new file mode 100644 index 000000000000..674fee0c8ae2 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UnresolvePullRequestCommentsRequest.php @@ -0,0 +1,180 @@ +google.cloud.securesourcemanager.v1.UnresolvePullRequestCommentsRequest + */ +class UnresolvePullRequestCommentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * 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}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * 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. + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $names; + /** + * Optional. If set, at least one comment in a thread is required, rest of the + * comments in the same thread will be automatically updated to unresolved. If + * unset, all comments in the same thread need be present. + * + * Generated from protobuf field bool auto_fill = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $auto_fill = false; + + /** + * @param string $parent 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}` + * Please see {@see SecureSourceManagerClient::pullRequestName()} for help formatting this field. + * @param string[] $names 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. Please see + * {@see SecureSourceManagerClient::pullRequestCommentName()} for help formatting this field. + * + * @return \Google\Cloud\SecureSourceManager\V1\UnresolvePullRequestCommentsRequest + * + * @experimental + */ + public static function build(string $parent, array $names): self + { + return (new self()) + ->setParent($parent) + ->setNames($names); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * 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}` + * @type string[] $names + * 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. + * @type bool $auto_fill + * Optional. If set, at least one comment in a thread is required, rest of the + * comments in the same thread will be automatically updated to unresolved. If + * unset, all comments in the same thread need be present. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * 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}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * 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}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * 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. + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * 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. + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string[] $var + * @return $this + */ + public function setNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->names = $arr; + + return $this; + } + + /** + * Optional. If set, at least one comment in a thread is required, rest of the + * comments in the same thread will be automatically updated to unresolved. If + * unset, all comments in the same thread need be present. + * + * Generated from protobuf field bool auto_fill = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAutoFill() + { + return $this->auto_fill; + } + + /** + * Optional. If set, at least one comment in a thread is required, rest of the + * comments in the same thread will be automatically updated to unresolved. If + * unset, all comments in the same thread need be present. + * + * Generated from protobuf field bool auto_fill = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAutoFill($var) + { + GPBUtil::checkBool($var); + $this->auto_fill = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UnresolvePullRequestCommentsResponse.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UnresolvePullRequestCommentsResponse.php new file mode 100644 index 000000000000..ae63d675a94f --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UnresolvePullRequestCommentsResponse.php @@ -0,0 +1,67 @@ +google.cloud.securesourcemanager.v1.UnresolvePullRequestCommentsResponse + */ +class UnresolvePullRequestCommentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of pull request comments unresolved. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comments = 1; + */ + private $pull_request_comments; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecureSourceManager\V1\PullRequestComment[] $pull_request_comments + * The list of pull request comments unresolved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * The list of pull request comments unresolved. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comments = 1; + * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\PullRequestComment> + */ + public function getPullRequestComments() + { + return $this->pull_request_comments; + } + + /** + * The list of pull request comments unresolved. + * + * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comments = 1; + * @param \Google\Cloud\SecureSourceManager\V1\PullRequestComment[] $var + * @return $this + */ + public function setPullRequestComments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\PullRequestComment::class); + $this->pull_request_comments = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateBranchRuleRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateBranchRuleRequest.php new file mode 100644 index 000000000000..66109374c7df --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateBranchRuleRequest.php @@ -0,0 +1,187 @@ +google.cloud.securesourcemanager.v1.UpdateBranchRuleRequest + */ +class UpdateBranchRuleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .google.cloud.securesourcemanager.v1.BranchRule branch_rule = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $branch_rule = null; + /** + * Optional. If set, validate the request and preview the review, but do not + * actually post it. (https://google.aip.dev/163, for declarative friendly) + * + * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + /** + * Optional. 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. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\SecureSourceManager\V1\BranchRule $branchRule + * @param \Google\Protobuf\FieldMask $updateMask Optional. 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. + * + * @return \Google\Cloud\SecureSourceManager\V1\UpdateBranchRuleRequest + * + * @experimental + */ + public static function build(\Google\Cloud\SecureSourceManager\V1\BranchRule $branchRule, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setBranchRule($branchRule) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecureSourceManager\V1\BranchRule $branch_rule + * @type bool $validate_only + * Optional. If set, validate the request and preview the review, but do not + * actually post it. (https://google.aip.dev/163, for declarative friendly) + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. 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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .google.cloud.securesourcemanager.v1.BranchRule branch_rule = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecureSourceManager\V1\BranchRule|null + */ + public function getBranchRule() + { + return $this->branch_rule; + } + + public function hasBranchRule() + { + return isset($this->branch_rule); + } + + public function clearBranchRule() + { + unset($this->branch_rule); + } + + /** + * Generated from protobuf field .google.cloud.securesourcemanager.v1.BranchRule branch_rule = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecureSourceManager\V1\BranchRule $var + * @return $this + */ + public function setBranchRule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\BranchRule::class); + $this->branch_rule = $var; + + return $this; + } + + /** + * Optional. If set, validate the request and preview the review, but do not + * actually post it. (https://google.aip.dev/163, for declarative friendly) + * + * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. If set, validate the request and preview the review, but do not + * actually post it. (https://google.aip.dev/163, for declarative friendly) + * + * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * Optional. 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. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. 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. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateHookRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateHookRequest.php new file mode 100644 index 000000000000..44200539befc --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateHookRequest.php @@ -0,0 +1,156 @@ +google.cloud.securesourcemanager.v1.UpdateHookRequest + */ +class UpdateHookRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. 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. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. The hook being updated. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Hook hook = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $hook = null; + + /** + * @param \Google\Cloud\SecureSourceManager\V1\Hook $hook Required. The hook being updated. + * @param \Google\Protobuf\FieldMask $updateMask Optional. 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. + * + * @return \Google\Cloud\SecureSourceManager\V1\UpdateHookRequest + * + * @experimental + */ + public static function build(\Google\Cloud\SecureSourceManager\V1\Hook $hook, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setHook($hook) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. 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. + * @type \Google\Cloud\SecureSourceManager\V1\Hook $hook + * Required. The hook being updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Optional. 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. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. 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. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The hook being updated. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Hook hook = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecureSourceManager\V1\Hook|null + */ + public function getHook() + { + return $this->hook; + } + + public function hasHook() + { + return isset($this->hook); + } + + public function clearHook() + { + unset($this->hook); + } + + /** + * Required. The hook being updated. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Hook hook = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecureSourceManager\V1\Hook $var + * @return $this + */ + public function setHook($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\Hook::class); + $this->hook = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateIssueCommentRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateIssueCommentRequest.php new file mode 100644 index 000000000000..1ced40e0aebf --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateIssueCommentRequest.php @@ -0,0 +1,156 @@ +google.cloud.securesourcemanager.v1.UpdateIssueCommentRequest + */ +class UpdateIssueCommentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The issue comment to update. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.IssueComment issue_comment = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $issue_comment = null; + /** + * 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. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\SecureSourceManager\V1\IssueComment $issueComment Required. The issue comment to update. + * @param \Google\Protobuf\FieldMask $updateMask 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. + * + * @return \Google\Cloud\SecureSourceManager\V1\UpdateIssueCommentRequest + * + * @experimental + */ + public static function build(\Google\Cloud\SecureSourceManager\V1\IssueComment $issueComment, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setIssueComment($issueComment) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecureSourceManager\V1\IssueComment $issue_comment + * Required. The issue comment to update. + * @type \Google\Protobuf\FieldMask $update_mask + * 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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The issue comment to update. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.IssueComment issue_comment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecureSourceManager\V1\IssueComment|null + */ + public function getIssueComment() + { + return $this->issue_comment; + } + + public function hasIssueComment() + { + return isset($this->issue_comment); + } + + public function clearIssueComment() + { + unset($this->issue_comment); + } + + /** + * Required. The issue comment to update. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.IssueComment issue_comment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecureSourceManager\V1\IssueComment $var + * @return $this + */ + public function setIssueComment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\IssueComment::class); + $this->issue_comment = $var; + + return $this; + } + + /** + * 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. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * 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. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateIssueRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateIssueRequest.php new file mode 100644 index 000000000000..e6cb4b664442 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateIssueRequest.php @@ -0,0 +1,156 @@ +google.cloud.securesourcemanager.v1.UpdateIssueRequest + */ +class UpdateIssueRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The issue to update. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Issue issue = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $issue = null; + /** + * 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. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\SecureSourceManager\V1\Issue $issue Required. The issue to update. + * @param \Google\Protobuf\FieldMask $updateMask 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. + * + * @return \Google\Cloud\SecureSourceManager\V1\UpdateIssueRequest + * + * @experimental + */ + public static function build(\Google\Cloud\SecureSourceManager\V1\Issue $issue, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setIssue($issue) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecureSourceManager\V1\Issue $issue + * Required. The issue to update. + * @type \Google\Protobuf\FieldMask $update_mask + * 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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The issue to update. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Issue issue = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecureSourceManager\V1\Issue|null + */ + public function getIssue() + { + return $this->issue; + } + + public function hasIssue() + { + return isset($this->issue); + } + + public function clearIssue() + { + unset($this->issue); + } + + /** + * Required. The issue to update. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Issue issue = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecureSourceManager\V1\Issue $var + * @return $this + */ + public function setIssue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\Issue::class); + $this->issue = $var; + + return $this; + } + + /** + * 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. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * 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. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdatePullRequestCommentRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdatePullRequestCommentRequest.php new file mode 100644 index 000000000000..48157c757576 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdatePullRequestCommentRequest.php @@ -0,0 +1,146 @@ +google.cloud.securesourcemanager.v1.UpdatePullRequestCommentRequest + */ +class UpdatePullRequestCommentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The pull request comment to update. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comment = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $pull_request_comment = null; + /** + * 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`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\SecureSourceManager\V1\PullRequestComment $pullRequestComment Required. The pull request comment to update. + * @param \Google\Protobuf\FieldMask $updateMask 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`. + * + * @return \Google\Cloud\SecureSourceManager\V1\UpdatePullRequestCommentRequest + * + * @experimental + */ + public static function build(\Google\Cloud\SecureSourceManager\V1\PullRequestComment $pullRequestComment, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setPullRequestComment($pullRequestComment) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecureSourceManager\V1\PullRequestComment $pull_request_comment + * Required. The pull request comment to update. + * @type \Google\Protobuf\FieldMask $update_mask + * 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`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The pull request comment to update. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecureSourceManager\V1\PullRequestComment|null + */ + public function getPullRequestComment() + { + return $this->pull_request_comment; + } + + public function hasPullRequestComment() + { + return isset($this->pull_request_comment); + } + + public function clearPullRequestComment() + { + unset($this->pull_request_comment); + } + + /** + * Required. The pull request comment to update. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecureSourceManager\V1\PullRequestComment $var + * @return $this + */ + public function setPullRequestComment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\PullRequestComment::class); + $this->pull_request_comment = $var; + + return $this; + } + + /** + * 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`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * 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`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdatePullRequestRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdatePullRequestRequest.php new file mode 100644 index 000000000000..583588f754bc --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdatePullRequestRequest.php @@ -0,0 +1,156 @@ +google.cloud.securesourcemanager.v1.UpdatePullRequestRequest + */ +class UpdatePullRequestRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The pull request to update. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest pull_request = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $pull_request = null; + /** + * 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. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\SecureSourceManager\V1\PullRequest $pullRequest Required. The pull request to update. + * @param \Google\Protobuf\FieldMask $updateMask 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. + * + * @return \Google\Cloud\SecureSourceManager\V1\UpdatePullRequestRequest + * + * @experimental + */ + public static function build(\Google\Cloud\SecureSourceManager\V1\PullRequest $pullRequest, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setPullRequest($pullRequest) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecureSourceManager\V1\PullRequest $pull_request + * Required. The pull request to update. + * @type \Google\Protobuf\FieldMask $update_mask + * 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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * Required. The pull request to update. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest pull_request = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecureSourceManager\V1\PullRequest|null + */ + public function getPullRequest() + { + return $this->pull_request; + } + + public function hasPullRequest() + { + return isset($this->pull_request); + } + + public function clearPullRequest() + { + unset($this->pull_request); + } + + /** + * Required. The pull request to update. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest pull_request = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecureSourceManager\V1\PullRequest $var + * @return $this + */ + public function setPullRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\PullRequest::class); + $this->pull_request = $var; + + return $this; + } + + /** + * 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. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * 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. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateRepositoryRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateRepositoryRequest.php new file mode 100644 index 000000000000..252ac6de495b --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateRepositoryRequest.php @@ -0,0 +1,194 @@ +google.cloud.securesourcemanager.v1.UpdateRepositoryRequest + */ +class UpdateRepositoryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * 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. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. The repository being updated. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Repository repository = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $repository = null; + /** + * Optional. False by default. If set to true, the request is validated and + * the user is provided with an expected result, but no actual change is made. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $validate_only = false; + + /** + * @param \Google\Cloud\SecureSourceManager\V1\Repository $repository Required. The repository being updated. + * @param \Google\Protobuf\FieldMask $updateMask 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. + * + * @return \Google\Cloud\SecureSourceManager\V1\UpdateRepositoryRequest + * + * @experimental + */ + public static function build(\Google\Cloud\SecureSourceManager\V1\Repository $repository, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setRepository($repository) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * 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. + * @type \Google\Cloud\SecureSourceManager\V1\Repository $repository + * Required. The repository being updated. + * @type bool $validate_only + * Optional. False by default. If set to true, the request is validated and + * the user is provided with an expected result, but no actual change is made. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); + parent::__construct($data); + } + + /** + * 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. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * 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. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The repository being updated. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Repository repository = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\SecureSourceManager\V1\Repository|null + */ + public function getRepository() + { + return $this->repository; + } + + public function hasRepository() + { + return isset($this->repository); + } + + public function clearRepository() + { + unset($this->repository); + } + + /** + * Required. The repository being updated. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Repository repository = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\SecureSourceManager\V1\Repository $var + * @return $this + */ + public function setRepository($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\Repository::class); + $this->repository = $var; + + return $this; + } + + /** + * Optional. False by default. If set to true, the request is validated and + * the user is provided with an expected result, but no actual change is made. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Optional. False by default. If set to true, the request is validated and + * the user is provided with an expected result, but no actual change is made. + * + * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/batch_create_pull_request_comments.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/batch_create_pull_request_comments.php new file mode 100644 index 000000000000..911390e7f454 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/batch_create_pull_request_comments.php @@ -0,0 +1,114 @@ +setParent($formattedRequestsParent) + ->setPullRequestComment($requestsPullRequestComment); + $requests = [$createPullRequestCommentRequest,]; + $request = (new BatchCreatePullRequestCommentsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->batchCreatePullRequestComments($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BatchCreatePullRequestCommentsResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SecureSourceManagerClient::pullRequestName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]', + '[PULL_REQUEST]' + ); + $formattedRequestsParent = SecureSourceManagerClient::pullRequestName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]', + '[PULL_REQUEST]' + ); + + batch_create_pull_request_comments_sample($formattedParent, $formattedRequestsParent); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_BatchCreatePullRequestComments_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/close_issue.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/close_issue.php new file mode 100644 index 000000000000..123dc716d02b --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/close_issue.php @@ -0,0 +1,90 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->closeIssue($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Issue $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SecureSourceManagerClient::issueName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]', + '[ISSUE]' + ); + + close_issue_sample($formattedName); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_CloseIssue_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/close_pull_request.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/close_pull_request.php new file mode 100644 index 000000000000..9a6eefc11b0e --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/close_pull_request.php @@ -0,0 +1,90 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->closePullRequest($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PullRequest $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SecureSourceManagerClient::pullRequestName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]', + '[PULL_REQUEST]' + ); + + close_pull_request_sample($formattedName); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_ClosePullRequest_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_branch_rule.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_branch_rule.php new file mode 100644 index 000000000000..b91b47c680ff --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_branch_rule.php @@ -0,0 +1,91 @@ +setParent($formattedParent) + ->setBranchRule($branchRule) + ->setBranchRuleId($branchRuleId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->createBranchRule($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BranchRule $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SecureSourceManagerClient::repositoryName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]' + ); + $branchRuleId = '[BRANCH_RULE_ID]'; + + create_branch_rule_sample($formattedParent, $branchRuleId); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_CreateBranchRule_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_hook.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_hook.php new file mode 100644 index 000000000000..5ffe52c6e2e3 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_hook.php @@ -0,0 +1,100 @@ +setTargetUri($hookTargetUri); + $request = (new CreateHookRequest()) + ->setParent($formattedParent) + ->setHook($hook) + ->setHookId($hookId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->createHook($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Hook $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SecureSourceManagerClient::repositoryName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]' + ); + $hookTargetUri = '[TARGET_URI]'; + $hookId = '[HOOK_ID]'; + + create_hook_sample($formattedParent, $hookTargetUri, $hookId); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_CreateHook_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_instance.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_instance.php new file mode 100644 index 000000000000..a072ad05cfb7 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_instance.php @@ -0,0 +1,88 @@ +setParent($formattedParent) + ->setInstanceId($instanceId) + ->setInstance($instance); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->createInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SecureSourceManagerClient::locationName('[PROJECT]', '[LOCATION]'); + $instanceId = '[INSTANCE_ID]'; + + create_instance_sample($formattedParent, $instanceId); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_CreateInstance_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_issue.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_issue.php new file mode 100644 index 000000000000..adaba0b7d41f --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_issue.php @@ -0,0 +1,93 @@ +setTitle($issueTitle); + $request = (new CreateIssueRequest()) + ->setParent($formattedParent) + ->setIssue($issue); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->createIssue($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Issue $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SecureSourceManagerClient::repositoryName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]' + ); + $issueTitle = '[TITLE]'; + + create_issue_sample($formattedParent, $issueTitle); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_CreateIssue_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_issue_comment.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_issue_comment.php new file mode 100644 index 000000000000..67a807c965e7 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_issue_comment.php @@ -0,0 +1,94 @@ +setBody($issueCommentBody); + $request = (new CreateIssueCommentRequest()) + ->setParent($formattedParent) + ->setIssueComment($issueComment); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->createIssueComment($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var IssueComment $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SecureSourceManagerClient::issueName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]', + '[ISSUE]' + ); + $issueCommentBody = '[BODY]'; + + create_issue_comment_sample($formattedParent, $issueCommentBody); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_CreateIssueComment_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_pull_request.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_pull_request.php new file mode 100644 index 000000000000..ed8d69bcc4c3 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_pull_request.php @@ -0,0 +1,102 @@ +setRef($pullRequestBaseRef); + $pullRequest = (new PullRequest()) + ->setTitle($pullRequestTitle) + ->setBase($pullRequestBase); + $request = (new CreatePullRequestRequest()) + ->setParent($formattedParent) + ->setPullRequest($pullRequest); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->createPullRequest($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PullRequest $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SecureSourceManagerClient::repositoryName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]' + ); + $pullRequestTitle = '[TITLE]'; + $pullRequestBaseRef = '[REF]'; + + create_pull_request_sample($formattedParent, $pullRequestTitle, $pullRequestBaseRef); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_CreatePullRequest_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_pull_request_comment.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_pull_request_comment.php new file mode 100644 index 000000000000..7880d5fefc40 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_pull_request_comment.php @@ -0,0 +1,96 @@ +setParent($formattedParent) + ->setPullRequestComment($pullRequestComment); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->createPullRequestComment($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PullRequestComment $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SecureSourceManagerClient::pullRequestName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]', + '[PULL_REQUEST]' + ); + + create_pull_request_comment_sample($formattedParent); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_CreatePullRequestComment_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_repository.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_repository.php new file mode 100644 index 000000000000..6d9dc7c3222c --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_repository.php @@ -0,0 +1,94 @@ +setParent($formattedParent) + ->setRepository($repository) + ->setRepositoryId($repositoryId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->createRepository($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Repository $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SecureSourceManagerClient::locationName('[PROJECT]', '[LOCATION]'); + $repositoryId = '[REPOSITORY_ID]'; + + create_repository_sample($formattedParent, $repositoryId); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_CreateRepository_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_branch_rule.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_branch_rule.php new file mode 100644 index 000000000000..21f582de10a1 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_branch_rule.php @@ -0,0 +1,84 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->deleteBranchRule($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SecureSourceManagerClient::branchRuleName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]', + '[BRANCH_RULE]' + ); + + delete_branch_rule_sample($formattedName); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_DeleteBranchRule_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_hook.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_hook.php new file mode 100644 index 000000000000..665e01c72b42 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_hook.php @@ -0,0 +1,87 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->deleteHook($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SecureSourceManagerClient::hookName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]', + '[HOOK]' + ); + + delete_hook_sample($formattedName); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_DeleteHook_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_instance.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_instance.php new file mode 100644 index 000000000000..a02b42a77440 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_instance.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->deleteInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SecureSourceManagerClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + delete_instance_sample($formattedName); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_DeleteInstance_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_issue.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_issue.php new file mode 100644 index 000000000000..b51889af2143 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_issue.php @@ -0,0 +1,87 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->deleteIssue($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SecureSourceManagerClient::issueName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]', + '[ISSUE]' + ); + + delete_issue_sample($formattedName); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_DeleteIssue_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_issue_comment.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_issue_comment.php new file mode 100644 index 000000000000..6cfed6d9cde3 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_issue_comment.php @@ -0,0 +1,88 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->deleteIssueComment($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SecureSourceManagerClient::issueCommentName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]', + '[ISSUE]', + '[COMMENT]' + ); + + delete_issue_comment_sample($formattedName); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_DeleteIssueComment_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_pull_request_comment.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_pull_request_comment.php new file mode 100644 index 000000000000..1b0e7edf3f12 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_pull_request_comment.php @@ -0,0 +1,88 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->deletePullRequestComment($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SecureSourceManagerClient::pullRequestCommentName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]', + '[PULL_REQUEST]', + '[COMMENT]' + ); + + delete_pull_request_comment_sample($formattedName); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_DeletePullRequestComment_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_repository.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_repository.php new file mode 100644 index 000000000000..461a68a6ded3 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_repository.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->deleteRepository($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SecureSourceManagerClient::repositoryName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]' + ); + + delete_repository_sample($formattedName); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_DeleteRepository_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/fetch_blob.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/fetch_blob.php new file mode 100644 index 000000000000..ba21bb7a9139 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/fetch_blob.php @@ -0,0 +1,80 @@ +setRepository($formattedRepository) + ->setSha($sha); + + // Call the API and handle any network failures. + try { + /** @var FetchBlobResponse $response */ + $response = $secureSourceManagerClient->fetchBlob($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedRepository = SecureSourceManagerClient::repositoryName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]' + ); + $sha = '[SHA]'; + + fetch_blob_sample($formattedRepository, $sha); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_FetchBlob_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/fetch_tree.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/fetch_tree.php new file mode 100644 index 000000000000..a1d583e4537e --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/fetch_tree.php @@ -0,0 +1,82 @@ +setRepository($formattedRepository); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $secureSourceManagerClient->fetchTree($request); + + /** @var TreeEntry $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedRepository = SecureSourceManagerClient::repositoryName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]' + ); + + fetch_tree_sample($formattedRepository); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_FetchTree_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_branch_rule.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_branch_rule.php new file mode 100644 index 000000000000..9b4ca160f7ab --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_branch_rule.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var BranchRule $response */ + $response = $secureSourceManagerClient->getBranchRule($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SecureSourceManagerClient::branchRuleName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]', + '[BRANCH_RULE]' + ); + + get_branch_rule_sample($formattedName); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_GetBranchRule_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_hook.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_hook.php new file mode 100644 index 000000000000..51835c9df3d2 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_hook.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Hook $response */ + $response = $secureSourceManagerClient->getHook($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SecureSourceManagerClient::hookName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]', + '[HOOK]' + ); + + get_hook_sample($formattedName); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_GetHook_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_iam_policy.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_iam_policy.php new file mode 100644 index 000000000000..4f50b96d0eef --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $secureSourceManagerClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_GetIamPolicy_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_iam_policy_repo.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_iam_policy_repo.php new file mode 100644 index 000000000000..48a586cc0406 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_iam_policy_repo.php @@ -0,0 +1,71 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $secureSourceManagerClient->getIamPolicyRepo($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_repo_sample($resource); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_GetIamPolicyRepo_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_instance.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_instance.php new file mode 100644 index 000000000000..8ba4d2c69111 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_instance.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Instance $response */ + $response = $secureSourceManagerClient->getInstance($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SecureSourceManagerClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + get_instance_sample($formattedName); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_GetInstance_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_issue.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_issue.php new file mode 100644 index 000000000000..1002881fb44e --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_issue.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Issue $response */ + $response = $secureSourceManagerClient->getIssue($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SecureSourceManagerClient::issueName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]', + '[ISSUE]' + ); + + get_issue_sample($formattedName); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_GetIssue_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_issue_comment.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_issue_comment.php new file mode 100644 index 000000000000..4f6ea57f3c3f --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_issue_comment.php @@ -0,0 +1,79 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var IssueComment $response */ + $response = $secureSourceManagerClient->getIssueComment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SecureSourceManagerClient::issueCommentName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]', + '[ISSUE]', + '[COMMENT]' + ); + + get_issue_comment_sample($formattedName); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_GetIssueComment_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_location.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_location.php new file mode 100644 index 000000000000..baab9940be14 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END securesourcemanager_v1_generated_SecureSourceManager_GetLocation_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_pull_request.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_pull_request.php new file mode 100644 index 000000000000..390f35cfef81 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_pull_request.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PullRequest $response */ + $response = $secureSourceManagerClient->getPullRequest($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SecureSourceManagerClient::pullRequestName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]', + '[PULL_REQUEST]' + ); + + get_pull_request_sample($formattedName); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_GetPullRequest_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_pull_request_comment.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_pull_request_comment.php new file mode 100644 index 000000000000..1c608fca77cb --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_pull_request_comment.php @@ -0,0 +1,79 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PullRequestComment $response */ + $response = $secureSourceManagerClient->getPullRequestComment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SecureSourceManagerClient::pullRequestCommentName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]', + '[PULL_REQUEST]', + '[COMMENT]' + ); + + get_pull_request_comment_sample($formattedName); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_GetPullRequestComment_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_repository.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_repository.php new file mode 100644 index 000000000000..79fd829beef3 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_repository.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Repository $response */ + $response = $secureSourceManagerClient->getRepository($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SecureSourceManagerClient::repositoryName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]' + ); + + get_repository_sample($formattedName); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_GetRepository_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_branch_rules.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_branch_rules.php new file mode 100644 index 000000000000..18b662a74bf5 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_branch_rules.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $secureSourceManagerClient->listBranchRules($request); + + /** @var BranchRule $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SecureSourceManagerClient::repositoryName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]' + ); + + list_branch_rules_sample($formattedParent); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_ListBranchRules_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_hooks.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_hooks.php new file mode 100644 index 000000000000..da7a80f1b960 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_hooks.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $secureSourceManagerClient->listHooks($request); + + /** @var Hook $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SecureSourceManagerClient::repositoryName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]' + ); + + list_hooks_sample($formattedParent); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_ListHooks_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_instances.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_instances.php new file mode 100644 index 000000000000..3a552de67fd6 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_instances.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $secureSourceManagerClient->listInstances($request); + + /** @var Instance $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SecureSourceManagerClient::locationName('[PROJECT]', '[LOCATION]'); + + list_instances_sample($formattedParent); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_ListInstances_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_issue_comments.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_issue_comments.php new file mode 100644 index 000000000000..b779e4bcf516 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_issue_comments.php @@ -0,0 +1,82 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $secureSourceManagerClient->listIssueComments($request); + + /** @var IssueComment $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SecureSourceManagerClient::issueName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]', + '[ISSUE]' + ); + + list_issue_comments_sample($formattedParent); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_ListIssueComments_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_issues.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_issues.php new file mode 100644 index 000000000000..b6f802f608d4 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_issues.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $secureSourceManagerClient->listIssues($request); + + /** @var Issue $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SecureSourceManagerClient::repositoryName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]' + ); + + list_issues_sample($formattedParent); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_ListIssues_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_locations.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_locations.php new file mode 100644 index 000000000000..6942535f43ca --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_locations.php @@ -0,0 +1,78 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END securesourcemanager_v1_generated_SecureSourceManager_ListLocations_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_pull_request_comments.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_pull_request_comments.php new file mode 100644 index 000000000000..08f37aaf7345 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_pull_request_comments.php @@ -0,0 +1,82 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $secureSourceManagerClient->listPullRequestComments($request); + + /** @var PullRequestComment $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SecureSourceManagerClient::pullRequestName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]', + '[PULL_REQUEST]' + ); + + list_pull_request_comments_sample($formattedParent); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_ListPullRequestComments_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_pull_request_file_diffs.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_pull_request_file_diffs.php new file mode 100644 index 000000000000..534ac69419f4 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_pull_request_file_diffs.php @@ -0,0 +1,83 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $secureSourceManagerClient->listPullRequestFileDiffs($request); + + /** @var FileDiff $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SecureSourceManagerClient::pullRequestName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]', + '[PULL_REQUEST]' + ); + + list_pull_request_file_diffs_sample($formattedName); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_ListPullRequestFileDiffs_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_pull_requests.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_pull_requests.php new file mode 100644 index 000000000000..7bf83267880c --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_pull_requests.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $secureSourceManagerClient->listPullRequests($request); + + /** @var PullRequest $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SecureSourceManagerClient::repositoryName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]' + ); + + list_pull_requests_sample($formattedParent); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_ListPullRequests_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_repositories.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_repositories.php new file mode 100644 index 000000000000..5aa8882c10d0 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_repositories.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $secureSourceManagerClient->listRepositories($request); + + /** @var Repository $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SecureSourceManagerClient::locationName('[PROJECT]', '[LOCATION]'); + + list_repositories_sample($formattedParent); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_ListRepositories_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/merge_pull_request.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/merge_pull_request.php new file mode 100644 index 000000000000..d863f37fd979 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/merge_pull_request.php @@ -0,0 +1,90 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->mergePullRequest($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PullRequest $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SecureSourceManagerClient::pullRequestName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]', + '[PULL_REQUEST]' + ); + + merge_pull_request_sample($formattedName); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_MergePullRequest_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/open_issue.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/open_issue.php new file mode 100644 index 000000000000..97dabcb10a5d --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/open_issue.php @@ -0,0 +1,90 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->openIssue($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Issue $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SecureSourceManagerClient::issueName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]', + '[ISSUE]' + ); + + open_issue_sample($formattedName); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_OpenIssue_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/open_pull_request.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/open_pull_request.php new file mode 100644 index 000000000000..cc4e709008ef --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/open_pull_request.php @@ -0,0 +1,90 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->openPullRequest($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PullRequest $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SecureSourceManagerClient::pullRequestName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]', + '[PULL_REQUEST]' + ); + + open_pull_request_sample($formattedName); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_OpenPullRequest_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/resolve_pull_request_comments.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/resolve_pull_request_comments.php new file mode 100644 index 000000000000..8fac5736ff49 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/resolve_pull_request_comments.php @@ -0,0 +1,108 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->resolvePullRequestComments($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ResolvePullRequestCommentsResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SecureSourceManagerClient::pullRequestName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]', + '[PULL_REQUEST]' + ); + $formattedNamesElement = SecureSourceManagerClient::pullRequestCommentName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]', + '[PULL_REQUEST]', + '[COMMENT]' + ); + + resolve_pull_request_comments_sample($formattedParent, $formattedNamesElement); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_ResolvePullRequestComments_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/set_iam_policy.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/set_iam_policy.php new file mode 100644 index 000000000000..8118ad8ac590 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $secureSourceManagerClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_SetIamPolicy_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/set_iam_policy_repo.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/set_iam_policy_repo.php new file mode 100644 index 000000000000..9df5a3827eef --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/set_iam_policy_repo.php @@ -0,0 +1,73 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $secureSourceManagerClient->setIamPolicyRepo($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_repo_sample($resource); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_SetIamPolicyRepo_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/test_iam_permissions.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/test_iam_permissions.php new file mode 100644 index 000000000000..e1ee75655f98 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $secureSourceManagerClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_TestIamPermissions_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/test_iam_permissions_repo.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/test_iam_permissions_repo.php new file mode 100644 index 000000000000..6b021a9b35f4 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/test_iam_permissions_repo.php @@ -0,0 +1,79 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $secureSourceManagerClient->testIamPermissionsRepo($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_repo_sample($resource, $permissionsElement); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_TestIamPermissionsRepo_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/unresolve_pull_request_comments.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/unresolve_pull_request_comments.php new file mode 100644 index 000000000000..2653e0e33d58 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/unresolve_pull_request_comments.php @@ -0,0 +1,108 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->unresolvePullRequestComments($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var UnresolvePullRequestCommentsResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SecureSourceManagerClient::pullRequestName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]', + '[PULL_REQUEST]' + ); + $formattedNamesElement = SecureSourceManagerClient::pullRequestCommentName( + '[PROJECT]', + '[LOCATION]', + '[REPOSITORY]', + '[PULL_REQUEST]', + '[COMMENT]' + ); + + unresolve_pull_request_comments_sample($formattedParent, $formattedNamesElement); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_UnresolvePullRequestComments_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_branch_rule.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_branch_rule.php new file mode 100644 index 000000000000..6c6fa4b2cfd1 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_branch_rule.php @@ -0,0 +1,71 @@ +setBranchRule($branchRule); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->updateBranchRule($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BranchRule $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END securesourcemanager_v1_generated_SecureSourceManager_UpdateBranchRule_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_hook.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_hook.php new file mode 100644 index 000000000000..1abd8eeb0951 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_hook.php @@ -0,0 +1,84 @@ +setTargetUri($hookTargetUri); + $request = (new UpdateHookRequest()) + ->setHook($hook); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->updateHook($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Hook $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $hookTargetUri = '[TARGET_URI]'; + + update_hook_sample($hookTargetUri); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_UpdateHook_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_issue.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_issue.php new file mode 100644 index 000000000000..a69bed84bfad --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_issue.php @@ -0,0 +1,84 @@ +setTitle($issueTitle); + $request = (new UpdateIssueRequest()) + ->setIssue($issue); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->updateIssue($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Issue $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $issueTitle = '[TITLE]'; + + update_issue_sample($issueTitle); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_UpdateIssue_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_issue_comment.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_issue_comment.php new file mode 100644 index 000000000000..90292c11d340 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_issue_comment.php @@ -0,0 +1,84 @@ +setBody($issueCommentBody); + $request = (new UpdateIssueCommentRequest()) + ->setIssueComment($issueComment); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->updateIssueComment($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var IssueComment $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $issueCommentBody = '[BODY]'; + + update_issue_comment_sample($issueCommentBody); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_UpdateIssueComment_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_pull_request.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_pull_request.php new file mode 100644 index 000000000000..956f7fbc248b --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_pull_request.php @@ -0,0 +1,90 @@ +setRef($pullRequestBaseRef); + $pullRequest = (new PullRequest()) + ->setTitle($pullRequestTitle) + ->setBase($pullRequestBase); + $request = (new UpdatePullRequestRequest()) + ->setPullRequest($pullRequest); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->updatePullRequest($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PullRequest $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $pullRequestTitle = '[TITLE]'; + $pullRequestBaseRef = '[REF]'; + + update_pull_request_sample($pullRequestTitle, $pullRequestBaseRef); +} +// [END securesourcemanager_v1_generated_SecureSourceManager_UpdatePullRequest_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_pull_request_comment.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_pull_request_comment.php new file mode 100644 index 000000000000..332cd16fe5c5 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_pull_request_comment.php @@ -0,0 +1,71 @@ +setPullRequestComment($pullRequestComment); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->updatePullRequestComment($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PullRequestComment $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END securesourcemanager_v1_generated_SecureSourceManager_UpdatePullRequestComment_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_repository.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_repository.php new file mode 100644 index 000000000000..dcfd23030465 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_repository.php @@ -0,0 +1,71 @@ +setRepository($repository); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $secureSourceManagerClient->updateRepository($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Repository $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END securesourcemanager_v1_generated_SecureSourceManager_UpdateRepository_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/src/V1/Client/SecureSourceManagerClient.php b/owl-bot-staging/SecureSourceManager/v1/src/V1/Client/SecureSourceManagerClient.php new file mode 100644 index 000000000000..24a8f0c5a059 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/src/V1/Client/SecureSourceManagerClient.php @@ -0,0 +1,2192 @@ + batchCreatePullRequestCommentsAsync(BatchCreatePullRequestCommentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface closeIssueAsync(CloseIssueRequest $request, array $optionalArgs = []) + * @method PromiseInterface closePullRequestAsync(ClosePullRequestRequest $request, array $optionalArgs = []) + * @method PromiseInterface createBranchRuleAsync(CreateBranchRuleRequest $request, array $optionalArgs = []) + * @method PromiseInterface createHookAsync(CreateHookRequest $request, array $optionalArgs = []) + * @method PromiseInterface createInstanceAsync(CreateInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface createIssueAsync(CreateIssueRequest $request, array $optionalArgs = []) + * @method PromiseInterface createIssueCommentAsync(CreateIssueCommentRequest $request, array $optionalArgs = []) + * @method PromiseInterface createPullRequestAsync(CreatePullRequestRequest $request, array $optionalArgs = []) + * @method PromiseInterface createPullRequestCommentAsync(CreatePullRequestCommentRequest $request, array $optionalArgs = []) + * @method PromiseInterface createRepositoryAsync(CreateRepositoryRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteBranchRuleAsync(DeleteBranchRuleRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteHookAsync(DeleteHookRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteInstanceAsync(DeleteInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteIssueAsync(DeleteIssueRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteIssueCommentAsync(DeleteIssueCommentRequest $request, array $optionalArgs = []) + * @method PromiseInterface deletePullRequestCommentAsync(DeletePullRequestCommentRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteRepositoryAsync(DeleteRepositoryRequest $request, array $optionalArgs = []) + * @method PromiseInterface fetchBlobAsync(FetchBlobRequest $request, array $optionalArgs = []) + * @method PromiseInterface fetchTreeAsync(FetchTreeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getBranchRuleAsync(GetBranchRuleRequest $request, array $optionalArgs = []) + * @method PromiseInterface getHookAsync(GetHookRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyRepoAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getInstanceAsync(GetInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIssueAsync(GetIssueRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIssueCommentAsync(GetIssueCommentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getPullRequestAsync(GetPullRequestRequest $request, array $optionalArgs = []) + * @method PromiseInterface getPullRequestCommentAsync(GetPullRequestCommentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getRepositoryAsync(GetRepositoryRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBranchRulesAsync(ListBranchRulesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listHooksAsync(ListHooksRequest $request, array $optionalArgs = []) + * @method PromiseInterface listInstancesAsync(ListInstancesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listIssueCommentsAsync(ListIssueCommentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listIssuesAsync(ListIssuesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listPullRequestCommentsAsync(ListPullRequestCommentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listPullRequestFileDiffsAsync(ListPullRequestFileDiffsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listPullRequestsAsync(ListPullRequestsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listRepositoriesAsync(ListRepositoriesRequest $request, array $optionalArgs = []) + * @method PromiseInterface mergePullRequestAsync(MergePullRequestRequest $request, array $optionalArgs = []) + * @method PromiseInterface openIssueAsync(OpenIssueRequest $request, array $optionalArgs = []) + * @method PromiseInterface openPullRequestAsync(OpenPullRequestRequest $request, array $optionalArgs = []) + * @method PromiseInterface resolvePullRequestCommentsAsync(ResolvePullRequestCommentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyRepoAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsRepoAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface unresolvePullRequestCommentsAsync(UnresolvePullRequestCommentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateBranchRuleAsync(UpdateBranchRuleRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateHookAsync(UpdateHookRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateIssueAsync(UpdateIssueRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateIssueCommentAsync(UpdateIssueCommentRequest $request, array $optionalArgs = []) + * @method PromiseInterface updatePullRequestAsync(UpdatePullRequestRequest $request, array $optionalArgs = []) + * @method PromiseInterface updatePullRequestCommentAsync(UpdatePullRequestCommentRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateRepositoryAsync(UpdateRepositoryRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class SecureSourceManagerClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.securesourcemanager.v1.SecureSourceManager'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'securesourcemanager.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'securesourcemanager.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/secure_source_manager_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/secure_source_manager_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/secure_source_manager_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/secure_source_manager_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a branch_rule + * resource. + * + * @param string $project + * @param string $location + * @param string $repository + * @param string $branchRule + * + * @return string The formatted branch_rule resource. + */ + public static function branchRuleName(string $project, string $location, string $repository, string $branchRule): string + { + return self::getPathTemplate('branchRule')->render([ + 'project' => $project, + 'location' => $location, + 'repository' => $repository, + 'branch_rule' => $branchRule, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a ca_pool + * resource. + * + * @param string $project + * @param string $location + * @param string $caPool + * + * @return string The formatted ca_pool resource. + */ + public static function caPoolName(string $project, string $location, string $caPool): string + { + return self::getPathTemplate('caPool')->render([ + 'project' => $project, + 'location' => $location, + 'ca_pool' => $caPool, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a crypto_key + * resource. + * + * @param string $project + * @param string $location + * @param string $keyRing + * @param string $cryptoKey + * + * @return string The formatted crypto_key resource. + */ + public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string + { + return self::getPathTemplate('cryptoKey')->render([ + 'project' => $project, + 'location' => $location, + 'key_ring' => $keyRing, + 'crypto_key' => $cryptoKey, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a hook + * resource. + * + * @param string $project + * @param string $location + * @param string $repository + * @param string $hook + * + * @return string The formatted hook resource. + */ + public static function hookName(string $project, string $location, string $repository, string $hook): string + { + return self::getPathTemplate('hook')->render([ + 'project' => $project, + 'location' => $location, + 'repository' => $repository, + 'hook' => $hook, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a instance + * resource. + * + * @param string $project + * @param string $location + * @param string $instance + * + * @return string The formatted instance resource. + */ + public static function instanceName(string $project, string $location, string $instance): string + { + return self::getPathTemplate('instance')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a issue + * resource. + * + * @param string $project + * @param string $location + * @param string $repository + * @param string $issue + * + * @return string The formatted issue resource. + */ + public static function issueName(string $project, string $location, string $repository, string $issue): string + { + return self::getPathTemplate('issue')->render([ + 'project' => $project, + 'location' => $location, + 'repository' => $repository, + 'issue' => $issue, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * issue_comment resource. + * + * @param string $project + * @param string $location + * @param string $repository + * @param string $issue + * @param string $comment + * + * @return string The formatted issue_comment resource. + */ + public static function issueCommentName(string $project, string $location, string $repository, string $issue, string $comment): string + { + return self::getPathTemplate('issueComment')->render([ + 'project' => $project, + 'location' => $location, + 'repository' => $repository, + 'issue' => $issue, + 'comment' => $comment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a pull_request + * resource. + * + * @param string $project + * @param string $location + * @param string $repository + * @param string $pullRequest + * + * @return string The formatted pull_request resource. + */ + public static function pullRequestName(string $project, string $location, string $repository, string $pullRequest): string + { + return self::getPathTemplate('pullRequest')->render([ + 'project' => $project, + 'location' => $location, + 'repository' => $repository, + 'pull_request' => $pullRequest, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * pull_request_comment resource. + * + * @param string $project + * @param string $location + * @param string $repository + * @param string $pullRequest + * @param string $comment + * + * @return string The formatted pull_request_comment resource. + */ + public static function pullRequestCommentName(string $project, string $location, string $repository, string $pullRequest, string $comment): string + { + return self::getPathTemplate('pullRequestComment')->render([ + 'project' => $project, + 'location' => $location, + 'repository' => $repository, + 'pull_request' => $pullRequest, + 'comment' => $comment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a repository + * resource. + * + * @param string $project + * @param string $location + * @param string $repository + * + * @return string The formatted repository resource. + */ + public static function repositoryName(string $project, string $location, string $repository): string + { + return self::getPathTemplate('repository')->render([ + 'project' => $project, + 'location' => $location, + 'repository' => $repository, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * service_attachment resource. + * + * @param string $project + * @param string $region + * @param string $serviceAttachment + * + * @return string The formatted service_attachment resource. + */ + public static function serviceAttachmentName(string $project, string $region, string $serviceAttachment): string + { + return self::getPathTemplate('serviceAttachment')->render([ + 'project' => $project, + 'region' => $region, + 'service_attachment' => $serviceAttachment, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - branchRule: projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule} + * - caPool: projects/{project}/locations/{location}/caPools/{ca_pool} + * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} + * - hook: projects/{project}/locations/{location}/repositories/{repository}/hooks/{hook} + * - instance: projects/{project}/locations/{location}/instances/{instance} + * - issue: projects/{project}/locations/{location}/repositories/{repository}/issues/{issue} + * - issueComment: projects/{project}/locations/{location}/repositories/{repository}/issues/{issue}/issueComments/{comment} + * - location: projects/{project}/locations/{location} + * - pullRequest: projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request} + * - pullRequestComment: projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}/pullRequestComments/{comment} + * - repository: projects/{project}/locations/{location}/repositories/{repository} + * - serviceAttachment: projects/{project}/regions/{region}/serviceAttachments/{service_attachment} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'securesourcemanager.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\SecureSourceManager\V1\SecureSourceManagerClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new SecureSourceManagerClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Batch creates pull request comments. This function is used to create + * multiple PullRequestComments for code review. There needs to be exactly one + * PullRequestComment of type Review, and at most 100 PullRequestComments of + * type Code per request. The Position of the code comments must be unique + * within the request. + * + * The async variant is + * {@see SecureSourceManagerClient::batchCreatePullRequestCommentsAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/batch_create_pull_request_comments.php + * + * @param BatchCreatePullRequestCommentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchCreatePullRequestComments(BatchCreatePullRequestCommentsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('BatchCreatePullRequestComments', $request, $callOptions)->wait(); + } + + /** + * Closes an issue. + * + * The async variant is {@see SecureSourceManagerClient::closeIssueAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/close_issue.php + * + * @param CloseIssueRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function closeIssue(CloseIssueRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CloseIssue', $request, $callOptions)->wait(); + } + + /** + * Closes a pull request without merging. + * + * The async variant is {@see SecureSourceManagerClient::closePullRequestAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/close_pull_request.php + * + * @param ClosePullRequestRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function closePullRequest(ClosePullRequestRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ClosePullRequest', $request, $callOptions)->wait(); + } + + /** + * CreateBranchRule creates a branch rule in a given repository. + * + * The async variant is {@see SecureSourceManagerClient::createBranchRuleAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/create_branch_rule.php + * + * @param CreateBranchRuleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createBranchRule(CreateBranchRuleRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateBranchRule', $request, $callOptions)->wait(); + } + + /** + * Creates a new hook in a given repository. + * + * The async variant is {@see SecureSourceManagerClient::createHookAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/create_hook.php + * + * @param CreateHookRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createHook(CreateHookRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateHook', $request, $callOptions)->wait(); + } + + /** + * Creates a new instance in a given project and location. + * + * The async variant is {@see SecureSourceManagerClient::createInstanceAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/create_instance.php + * + * @param CreateInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createInstance(CreateInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateInstance', $request, $callOptions)->wait(); + } + + /** + * Creates an issue. + * + * The async variant is {@see SecureSourceManagerClient::createIssueAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/create_issue.php + * + * @param CreateIssueRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createIssue(CreateIssueRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateIssue', $request, $callOptions)->wait(); + } + + /** + * Creates an issue comment. + * + * The async variant is {@see SecureSourceManagerClient::createIssueCommentAsync()} + * . + * + * @example samples/V1/SecureSourceManagerClient/create_issue_comment.php + * + * @param CreateIssueCommentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createIssueComment(CreateIssueCommentRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateIssueComment', $request, $callOptions)->wait(); + } + + /** + * Creates a pull request. + * + * The async variant is {@see SecureSourceManagerClient::createPullRequestAsync()} + * . + * + * @example samples/V1/SecureSourceManagerClient/create_pull_request.php + * + * @param CreatePullRequestRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createPullRequest(CreatePullRequestRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreatePullRequest', $request, $callOptions)->wait(); + } + + /** + * Creates a pull request comment. This function is used to create a single + * PullRequestComment of type Comment, or a single PullRequestComment of type + * Code that's replying to another PullRequestComment of type Code. Use + * BatchCreatePullRequestComments to create multiple PullRequestComments for + * code reviews. + * + * The async variant is + * {@see SecureSourceManagerClient::createPullRequestCommentAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/create_pull_request_comment.php + * + * @param CreatePullRequestCommentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createPullRequestComment(CreatePullRequestCommentRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreatePullRequestComment', $request, $callOptions)->wait(); + } + + /** + * 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. + * + * The async variant is {@see SecureSourceManagerClient::createRepositoryAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/create_repository.php + * + * @param CreateRepositoryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createRepository(CreateRepositoryRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateRepository', $request, $callOptions)->wait(); + } + + /** + * DeleteBranchRule deletes a branch rule. + * + * The async variant is {@see SecureSourceManagerClient::deleteBranchRuleAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/delete_branch_rule.php + * + * @param DeleteBranchRuleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteBranchRule(DeleteBranchRuleRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteBranchRule', $request, $callOptions)->wait(); + } + + /** + * Deletes a Hook. + * + * The async variant is {@see SecureSourceManagerClient::deleteHookAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/delete_hook.php + * + * @param DeleteHookRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteHook(DeleteHookRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteHook', $request, $callOptions)->wait(); + } + + /** + * Deletes a single instance. + * + * The async variant is {@see SecureSourceManagerClient::deleteInstanceAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/delete_instance.php + * + * @param DeleteInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteInstance(DeleteInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteInstance', $request, $callOptions)->wait(); + } + + /** + * Deletes an issue. + * + * The async variant is {@see SecureSourceManagerClient::deleteIssueAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/delete_issue.php + * + * @param DeleteIssueRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteIssue(DeleteIssueRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteIssue', $request, $callOptions)->wait(); + } + + /** + * Deletes an issue comment. + * + * The async variant is {@see SecureSourceManagerClient::deleteIssueCommentAsync()} + * . + * + * @example samples/V1/SecureSourceManagerClient/delete_issue_comment.php + * + * @param DeleteIssueCommentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteIssueComment(DeleteIssueCommentRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteIssueComment', $request, $callOptions)->wait(); + } + + /** + * Deletes a pull request comment. + * + * The async variant is + * {@see SecureSourceManagerClient::deletePullRequestCommentAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/delete_pull_request_comment.php + * + * @param DeletePullRequestCommentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deletePullRequestComment(DeletePullRequestCommentRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeletePullRequestComment', $request, $callOptions)->wait(); + } + + /** + * Deletes a Repository. + * + * The async variant is {@see SecureSourceManagerClient::deleteRepositoryAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/delete_repository.php + * + * @param DeleteRepositoryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteRepository(DeleteRepositoryRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteRepository', $request, $callOptions)->wait(); + } + + /** + * Fetches a blob from a repository. + * + * The async variant is {@see SecureSourceManagerClient::fetchBlobAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/fetch_blob.php + * + * @param FetchBlobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return FetchBlobResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function fetchBlob(FetchBlobRequest $request, array $callOptions = []): FetchBlobResponse + { + return $this->startApiCall('FetchBlob', $request, $callOptions)->wait(); + } + + /** + * Fetches a tree from a repository. + * + * The async variant is {@see SecureSourceManagerClient::fetchTreeAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/fetch_tree.php + * + * @param FetchTreeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function fetchTree(FetchTreeRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('FetchTree', $request, $callOptions); + } + + /** + * GetBranchRule gets a branch rule. + * + * The async variant is {@see SecureSourceManagerClient::getBranchRuleAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/get_branch_rule.php + * + * @param GetBranchRuleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BranchRule + * + * @throws ApiException Thrown if the API call fails. + */ + public function getBranchRule(GetBranchRuleRequest $request, array $callOptions = []): BranchRule + { + return $this->startApiCall('GetBranchRule', $request, $callOptions)->wait(); + } + + /** + * Gets metadata of a hook. + * + * The async variant is {@see SecureSourceManagerClient::getHookAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/get_hook.php + * + * @param GetHookRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Hook + * + * @throws ApiException Thrown if the API call fails. + */ + public function getHook(GetHookRequest $request, array $callOptions = []): Hook + { + return $this->startApiCall('GetHook', $request, $callOptions)->wait(); + } + + /** + * Get IAM policy for a repository. + * + * The async variant is {@see SecureSourceManagerClient::getIamPolicyRepoAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/get_iam_policy_repo.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicyRepo(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicyRepo', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single instance. + * + * The async variant is {@see SecureSourceManagerClient::getInstanceAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/get_instance.php + * + * @param GetInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Instance + * + * @throws ApiException Thrown if the API call fails. + */ + public function getInstance(GetInstanceRequest $request, array $callOptions = []): Instance + { + return $this->startApiCall('GetInstance', $request, $callOptions)->wait(); + } + + /** + * Gets an issue. + * + * The async variant is {@see SecureSourceManagerClient::getIssueAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/get_issue.php + * + * @param GetIssueRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Issue + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIssue(GetIssueRequest $request, array $callOptions = []): Issue + { + return $this->startApiCall('GetIssue', $request, $callOptions)->wait(); + } + + /** + * Gets an issue comment. + * + * The async variant is {@see SecureSourceManagerClient::getIssueCommentAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/get_issue_comment.php + * + * @param GetIssueCommentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return IssueComment + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIssueComment(GetIssueCommentRequest $request, array $callOptions = []): IssueComment + { + return $this->startApiCall('GetIssueComment', $request, $callOptions)->wait(); + } + + /** + * Gets a pull request. + * + * The async variant is {@see SecureSourceManagerClient::getPullRequestAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/get_pull_request.php + * + * @param GetPullRequestRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PullRequest + * + * @throws ApiException Thrown if the API call fails. + */ + public function getPullRequest(GetPullRequestRequest $request, array $callOptions = []): PullRequest + { + return $this->startApiCall('GetPullRequest', $request, $callOptions)->wait(); + } + + /** + * Gets a pull request comment. + * + * The async variant is + * {@see SecureSourceManagerClient::getPullRequestCommentAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/get_pull_request_comment.php + * + * @param GetPullRequestCommentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PullRequestComment + * + * @throws ApiException Thrown if the API call fails. + */ + public function getPullRequestComment(GetPullRequestCommentRequest $request, array $callOptions = []): PullRequestComment + { + return $this->startApiCall('GetPullRequestComment', $request, $callOptions)->wait(); + } + + /** + * Gets metadata of a repository. + * + * The async variant is {@see SecureSourceManagerClient::getRepositoryAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/get_repository.php + * + * @param GetRepositoryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Repository + * + * @throws ApiException Thrown if the API call fails. + */ + public function getRepository(GetRepositoryRequest $request, array $callOptions = []): Repository + { + return $this->startApiCall('GetRepository', $request, $callOptions)->wait(); + } + + /** + * ListBranchRules lists branch rules in a given repository. + * + * The async variant is {@see SecureSourceManagerClient::listBranchRulesAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/list_branch_rules.php + * + * @param ListBranchRulesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listBranchRules(ListBranchRulesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListBranchRules', $request, $callOptions); + } + + /** + * Lists hooks in a given repository. + * + * The async variant is {@see SecureSourceManagerClient::listHooksAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/list_hooks.php + * + * @param ListHooksRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listHooks(ListHooksRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListHooks', $request, $callOptions); + } + + /** + * Lists Instances in a given project and location. + * + * The async variant is {@see SecureSourceManagerClient::listInstancesAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/list_instances.php + * + * @param ListInstancesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listInstances(ListInstancesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListInstances', $request, $callOptions); + } + + /** + * Lists comments in an issue. + * + * The async variant is {@see SecureSourceManagerClient::listIssueCommentsAsync()} + * . + * + * @example samples/V1/SecureSourceManagerClient/list_issue_comments.php + * + * @param ListIssueCommentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listIssueComments(ListIssueCommentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListIssueComments', $request, $callOptions); + } + + /** + * Lists issues in a repository. + * + * The async variant is {@see SecureSourceManagerClient::listIssuesAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/list_issues.php + * + * @param ListIssuesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listIssues(ListIssuesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListIssues', $request, $callOptions); + } + + /** + * Lists pull request comments. + * + * The async variant is + * {@see SecureSourceManagerClient::listPullRequestCommentsAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/list_pull_request_comments.php + * + * @param ListPullRequestCommentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listPullRequestComments(ListPullRequestCommentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListPullRequestComments', $request, $callOptions); + } + + /** + * Lists a pull request's file diffs. + * + * The async variant is + * {@see SecureSourceManagerClient::listPullRequestFileDiffsAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/list_pull_request_file_diffs.php + * + * @param ListPullRequestFileDiffsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listPullRequestFileDiffs(ListPullRequestFileDiffsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListPullRequestFileDiffs', $request, $callOptions); + } + + /** + * Lists pull requests in a repository. + * + * The async variant is {@see SecureSourceManagerClient::listPullRequestsAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/list_pull_requests.php + * + * @param ListPullRequestsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listPullRequests(ListPullRequestsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListPullRequests', $request, $callOptions); + } + + /** + * 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. + * + * The async variant is {@see SecureSourceManagerClient::listRepositoriesAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/list_repositories.php + * + * @param ListRepositoriesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listRepositories(ListRepositoriesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListRepositories', $request, $callOptions); + } + + /** + * Merges a pull request. + * + * The async variant is {@see SecureSourceManagerClient::mergePullRequestAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/merge_pull_request.php + * + * @param MergePullRequestRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function mergePullRequest(MergePullRequestRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('MergePullRequest', $request, $callOptions)->wait(); + } + + /** + * Opens an issue. + * + * The async variant is {@see SecureSourceManagerClient::openIssueAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/open_issue.php + * + * @param OpenIssueRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function openIssue(OpenIssueRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('OpenIssue', $request, $callOptions)->wait(); + } + + /** + * Opens a pull request. + * + * The async variant is {@see SecureSourceManagerClient::openPullRequestAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/open_pull_request.php + * + * @param OpenPullRequestRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function openPullRequest(OpenPullRequestRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('OpenPullRequest', $request, $callOptions)->wait(); + } + + /** + * Resolves pull request comments. A list of PullRequestComment names must be + * provided. The PullRequestComment names must be in the same conversation + * thread. If auto_fill is set, all comments in the conversation thread will + * be resolved. + * + * The async variant is + * {@see SecureSourceManagerClient::resolvePullRequestCommentsAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/resolve_pull_request_comments.php + * + * @param ResolvePullRequestCommentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function resolvePullRequestComments(ResolvePullRequestCommentsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ResolvePullRequestComments', $request, $callOptions)->wait(); + } + + /** + * Set IAM policy on a repository. + * + * The async variant is {@see SecureSourceManagerClient::setIamPolicyRepoAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/set_iam_policy_repo.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicyRepo(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicyRepo', $request, $callOptions)->wait(); + } + + /** + * Test IAM permissions on a repository. + * IAM permission checks are not required on this method. + * + * The async variant is + * {@see SecureSourceManagerClient::testIamPermissionsRepoAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/test_iam_permissions_repo.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissionsRepo(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissionsRepo', $request, $callOptions)->wait(); + } + + /** + * Unresolves pull request comments. A list of PullRequestComment names must + * be provided. The PullRequestComment names must be in the same conversation + * thread. If auto_fill is set, all comments in the conversation thread will + * be unresolved. + * + * The async variant is + * {@see SecureSourceManagerClient::unresolvePullRequestCommentsAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/unresolve_pull_request_comments.php + * + * @param UnresolvePullRequestCommentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function unresolvePullRequestComments(UnresolvePullRequestCommentsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UnresolvePullRequestComments', $request, $callOptions)->wait(); + } + + /** + * UpdateBranchRule updates a branch rule. + * + * The async variant is {@see SecureSourceManagerClient::updateBranchRuleAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/update_branch_rule.php + * + * @param UpdateBranchRuleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateBranchRule(UpdateBranchRuleRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateBranchRule', $request, $callOptions)->wait(); + } + + /** + * Updates the metadata of a hook. + * + * The async variant is {@see SecureSourceManagerClient::updateHookAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/update_hook.php + * + * @param UpdateHookRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateHook(UpdateHookRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateHook', $request, $callOptions)->wait(); + } + + /** + * Updates a issue. + * + * The async variant is {@see SecureSourceManagerClient::updateIssueAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/update_issue.php + * + * @param UpdateIssueRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateIssue(UpdateIssueRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateIssue', $request, $callOptions)->wait(); + } + + /** + * Updates an issue comment. + * + * The async variant is {@see SecureSourceManagerClient::updateIssueCommentAsync()} + * . + * + * @example samples/V1/SecureSourceManagerClient/update_issue_comment.php + * + * @param UpdateIssueCommentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateIssueComment(UpdateIssueCommentRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateIssueComment', $request, $callOptions)->wait(); + } + + /** + * Updates a pull request. + * + * The async variant is {@see SecureSourceManagerClient::updatePullRequestAsync()} + * . + * + * @example samples/V1/SecureSourceManagerClient/update_pull_request.php + * + * @param UpdatePullRequestRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updatePullRequest(UpdatePullRequestRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdatePullRequest', $request, $callOptions)->wait(); + } + + /** + * Updates a pull request comment. + * + * The async variant is + * {@see SecureSourceManagerClient::updatePullRequestCommentAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/update_pull_request_comment.php + * + * @param UpdatePullRequestCommentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updatePullRequestComment(UpdatePullRequestCommentRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdatePullRequestComment', $request, $callOptions)->wait(); + } + + /** + * Updates the metadata of a repository. + * + * The async variant is {@see SecureSourceManagerClient::updateRepositoryAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/update_repository.php + * + * @param UpdateRepositoryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateRepository(UpdateRepositoryRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateRepository', $request, $callOptions)->wait(); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see SecureSourceManagerClient::getIamPolicyAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see SecureSourceManagerClient::setIamPolicyAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * The async variant is {@see SecureSourceManagerClient::testIamPermissionsAsync()} + * . + * + * @example samples/V1/SecureSourceManagerClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see SecureSourceManagerClient::getLocationAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + + This method lists locations based on the resource scope provided in + the [ListLocationsRequest.name] field: + + * **Global locations**: If `name` is empty, the method lists the + public locations available to all projects. * **Project-specific + locations**: If `name` follows the format + `projects/{project}`, the method lists locations visible to that + specific project. This includes public, private, or other + project-specific locations enabled for the project. + + For gRPC and client library implementations, the resource name is + passed as the `name` field. For direct service calls, the resource + name is + incorporated into the request path based on the specific service + implementation and version. + * + * The async variant is {@see SecureSourceManagerClient::listLocationsAsync()} . + * + * @example samples/V1/SecureSourceManagerClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/SecureSourceManager/v1/src/V1/gapic_metadata.json b/owl-bot-staging/SecureSourceManager/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..194eafbf0a3e --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/src/V1/gapic_metadata.json @@ -0,0 +1,303 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.securesourcemanager.v1", + "libraryPackage": "Google\\Cloud\\SecureSourceManager\\V1", + "services": { + "SecureSourceManager": { + "clients": { + "grpc": { + "libraryClient": "SecureSourceManagerGapicClient", + "rpcs": { + "BatchCreatePullRequestComments": { + "methods": [ + "batchCreatePullRequestComments" + ] + }, + "CloseIssue": { + "methods": [ + "closeIssue" + ] + }, + "ClosePullRequest": { + "methods": [ + "closePullRequest" + ] + }, + "CreateBranchRule": { + "methods": [ + "createBranchRule" + ] + }, + "CreateHook": { + "methods": [ + "createHook" + ] + }, + "CreateInstance": { + "methods": [ + "createInstance" + ] + }, + "CreateIssue": { + "methods": [ + "createIssue" + ] + }, + "CreateIssueComment": { + "methods": [ + "createIssueComment" + ] + }, + "CreatePullRequest": { + "methods": [ + "createPullRequest" + ] + }, + "CreatePullRequestComment": { + "methods": [ + "createPullRequestComment" + ] + }, + "CreateRepository": { + "methods": [ + "createRepository" + ] + }, + "DeleteBranchRule": { + "methods": [ + "deleteBranchRule" + ] + }, + "DeleteHook": { + "methods": [ + "deleteHook" + ] + }, + "DeleteInstance": { + "methods": [ + "deleteInstance" + ] + }, + "DeleteIssue": { + "methods": [ + "deleteIssue" + ] + }, + "DeleteIssueComment": { + "methods": [ + "deleteIssueComment" + ] + }, + "DeletePullRequestComment": { + "methods": [ + "deletePullRequestComment" + ] + }, + "DeleteRepository": { + "methods": [ + "deleteRepository" + ] + }, + "FetchBlob": { + "methods": [ + "fetchBlob" + ] + }, + "FetchTree": { + "methods": [ + "fetchTree" + ] + }, + "GetBranchRule": { + "methods": [ + "getBranchRule" + ] + }, + "GetHook": { + "methods": [ + "getHook" + ] + }, + "GetIamPolicyRepo": { + "methods": [ + "getIamPolicyRepo" + ] + }, + "GetInstance": { + "methods": [ + "getInstance" + ] + }, + "GetIssue": { + "methods": [ + "getIssue" + ] + }, + "GetIssueComment": { + "methods": [ + "getIssueComment" + ] + }, + "GetPullRequest": { + "methods": [ + "getPullRequest" + ] + }, + "GetPullRequestComment": { + "methods": [ + "getPullRequestComment" + ] + }, + "GetRepository": { + "methods": [ + "getRepository" + ] + }, + "ListBranchRules": { + "methods": [ + "listBranchRules" + ] + }, + "ListHooks": { + "methods": [ + "listHooks" + ] + }, + "ListInstances": { + "methods": [ + "listInstances" + ] + }, + "ListIssueComments": { + "methods": [ + "listIssueComments" + ] + }, + "ListIssues": { + "methods": [ + "listIssues" + ] + }, + "ListPullRequestComments": { + "methods": [ + "listPullRequestComments" + ] + }, + "ListPullRequestFileDiffs": { + "methods": [ + "listPullRequestFileDiffs" + ] + }, + "ListPullRequests": { + "methods": [ + "listPullRequests" + ] + }, + "ListRepositories": { + "methods": [ + "listRepositories" + ] + }, + "MergePullRequest": { + "methods": [ + "mergePullRequest" + ] + }, + "OpenIssue": { + "methods": [ + "openIssue" + ] + }, + "OpenPullRequest": { + "methods": [ + "openPullRequest" + ] + }, + "ResolvePullRequestComments": { + "methods": [ + "resolvePullRequestComments" + ] + }, + "SetIamPolicyRepo": { + "methods": [ + "setIamPolicyRepo" + ] + }, + "TestIamPermissionsRepo": { + "methods": [ + "testIamPermissionsRepo" + ] + }, + "UnresolvePullRequestComments": { + "methods": [ + "unresolvePullRequestComments" + ] + }, + "UpdateBranchRule": { + "methods": [ + "updateBranchRule" + ] + }, + "UpdateHook": { + "methods": [ + "updateHook" + ] + }, + "UpdateIssue": { + "methods": [ + "updateIssue" + ] + }, + "UpdateIssueComment": { + "methods": [ + "updateIssueComment" + ] + }, + "UpdatePullRequest": { + "methods": [ + "updatePullRequest" + ] + }, + "UpdatePullRequestComment": { + "methods": [ + "updatePullRequestComment" + ] + }, + "UpdateRepository": { + "methods": [ + "updateRepository" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/SecureSourceManager/v1/src/V1/resources/secure_source_manager_client_config.json b/owl-bot-staging/SecureSourceManager/v1/src/V1/resources/secure_source_manager_client_config.json new file mode 100644 index 000000000000..0e997e350827 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/src/V1/resources/secure_source_manager_client_config.json @@ -0,0 +1,319 @@ +{ + "interfaces": { + "google.cloud.securesourcemanager.v1.SecureSourceManager": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "BatchCreatePullRequestComments": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CloseIssue": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ClosePullRequest": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateBranchRule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateHook": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateIssue": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateIssueComment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreatePullRequest": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreatePullRequestComment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateRepository": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteBranchRule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteHook": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteIssue": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteIssueComment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeletePullRequestComment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteRepository": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "FetchBlob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "FetchTree": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetBranchRule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetHook": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetIamPolicyRepo": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetInstance": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetIssue": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetIssueComment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetPullRequest": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetPullRequestComment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetRepository": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListBranchRules": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListHooks": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListInstances": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListIssueComments": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListIssues": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListPullRequestComments": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListPullRequestFileDiffs": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListPullRequests": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListRepositories": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "MergePullRequest": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "OpenIssue": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "OpenPullRequest": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ResolvePullRequestComments": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SetIamPolicyRepo": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TestIamPermissionsRepo": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UnresolvePullRequestComments": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateBranchRule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateHook": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateIssue": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateIssueComment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdatePullRequest": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdatePullRequestComment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateRepository": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/SecureSourceManager/v1/src/V1/resources/secure_source_manager_descriptor_config.php b/owl-bot-staging/SecureSourceManager/v1/src/V1/resources/secure_source_manager_descriptor_config.php new file mode 100644 index 000000000000..94e2e5f04bbd --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/src/V1/resources/secure_source_manager_descriptor_config.php @@ -0,0 +1,1036 @@ + [ + 'google.cloud.securesourcemanager.v1.SecureSourceManager' => [ + 'BatchCreatePullRequestComments' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\BatchCreatePullRequestCommentsResponse', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CloseIssue' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\Issue', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ClosePullRequest' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\PullRequest', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateBranchRule' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\BranchRule', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateHook' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\Hook', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateIssue' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\Issue', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateIssueComment' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\IssueComment', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreatePullRequest' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\PullRequest', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreatePullRequestComment' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\PullRequestComment', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateRepository' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\Repository', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteBranchRule' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteHook' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteIssue' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteIssueComment' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeletePullRequestComment' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteRepository' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'MergePullRequest' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\PullRequest', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'OpenIssue' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\Issue', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'OpenPullRequest' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\PullRequest', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ResolvePullRequestComments' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\ResolvePullRequestCommentsResponse', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UnresolvePullRequestComments' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\UnresolvePullRequestCommentsResponse', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateBranchRule' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\BranchRule', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'branch_rule.name', + 'fieldAccessors' => [ + 'getBranchRule', + 'getName', + ], + ], + ], + ], + 'UpdateHook' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\Hook', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'hook.name', + 'fieldAccessors' => [ + 'getHook', + 'getName', + ], + ], + ], + ], + 'UpdateIssue' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\Issue', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'issue.name', + 'fieldAccessors' => [ + 'getIssue', + 'getName', + ], + ], + ], + ], + 'UpdateIssueComment' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\IssueComment', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'issue_comment.name', + 'fieldAccessors' => [ + 'getIssueComment', + 'getName', + ], + ], + ], + ], + 'UpdatePullRequest' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\PullRequest', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'pull_request.name', + 'fieldAccessors' => [ + 'getPullRequest', + 'getName', + ], + ], + ], + ], + 'UpdatePullRequestComment' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\PullRequestComment', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'pull_request_comment.name', + 'fieldAccessors' => [ + 'getPullRequestComment', + 'getName', + ], + ], + ], + ], + 'UpdateRepository' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\Repository', + 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'repository.name', + 'fieldAccessors' => [ + 'getRepository', + 'getName', + ], + ], + ], + ], + 'FetchBlob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SecureSourceManager\V1\FetchBlobResponse', + 'headerParams' => [ + [ + 'keyName' => 'repository', + 'fieldAccessors' => [ + 'getRepository', + ], + ], + ], + ], + 'FetchTree' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTreeEntries', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\SecureSourceManager\V1\FetchTreeResponse', + 'headerParams' => [ + [ + 'keyName' => 'repository', + 'fieldAccessors' => [ + 'getRepository', + ], + ], + ], + ], + 'GetBranchRule' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SecureSourceManager\V1\BranchRule', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetHook' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SecureSourceManager\V1\Hook', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicyRepo' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'GetInstance' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SecureSourceManager\V1\Instance', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetIssue' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SecureSourceManager\V1\Issue', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetIssueComment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SecureSourceManager\V1\IssueComment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetPullRequest' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SecureSourceManager\V1\PullRequest', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetPullRequestComment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SecureSourceManager\V1\PullRequestComment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetRepository' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\SecureSourceManager\V1\Repository', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListBranchRules' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getBranchRules', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\SecureSourceManager\V1\ListBranchRulesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListHooks' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getHooks', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\SecureSourceManager\V1\ListHooksResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListInstances' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getInstances', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\SecureSourceManager\V1\ListInstancesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListIssueComments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getIssueComments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\SecureSourceManager\V1\ListIssueCommentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListIssues' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getIssues', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\SecureSourceManager\V1\ListIssuesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListPullRequestComments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getPullRequestComments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\SecureSourceManager\V1\ListPullRequestCommentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListPullRequestFileDiffs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getFileDiffs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\SecureSourceManager\V1\ListPullRequestFileDiffsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListPullRequests' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getPullRequests', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\SecureSourceManager\V1\ListPullRequestsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListRepositories' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRepositories', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\SecureSourceManager\V1\ListRepositoriesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'SetIamPolicyRepo' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissionsRepo' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'branchRule' => 'projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}', + 'caPool' => 'projects/{project}/locations/{location}/caPools/{ca_pool}', + 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', + 'hook' => 'projects/{project}/locations/{location}/repositories/{repository}/hooks/{hook}', + 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', + 'issue' => 'projects/{project}/locations/{location}/repositories/{repository}/issues/{issue}', + 'issueComment' => 'projects/{project}/locations/{location}/repositories/{repository}/issues/{issue}/issueComments/{comment}', + 'location' => 'projects/{project}/locations/{location}', + 'pullRequest' => 'projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}', + 'pullRequestComment' => 'projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}/pullRequestComments/{comment}', + 'repository' => 'projects/{project}/locations/{location}/repositories/{repository}', + 'serviceAttachment' => 'projects/{project}/regions/{region}/serviceAttachments/{service_attachment}', + ], + ], + ], +]; diff --git a/owl-bot-staging/SecureSourceManager/v1/src/V1/resources/secure_source_manager_rest_client_config.php b/owl-bot-staging/SecureSourceManager/v1/src/V1/resources/secure_source_manager_rest_client_config.php new file mode 100644 index 000000000000..a86b61e2541e --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/src/V1/resources/secure_source_manager_rest_client_config.php @@ -0,0 +1,753 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.securesourcemanager.v1.SecureSourceManager' => [ + 'BatchCreatePullRequestComments' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:batchCreate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CloseIssue' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/issues/*}:close', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ClosePullRequest' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:close', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateBranchRule' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*}/branchRules', + 'body' => 'branch_rule', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'branch_rule_id', + ], + ], + 'CreateHook' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*}/hooks', + 'body' => 'hook', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'hook_id', + ], + ], + 'CreateInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/instances', + 'body' => 'instance', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'instance_id', + ], + ], + 'CreateIssue' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*}/issues', + 'body' => 'issue', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateIssueComment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*/issues/*}/issueComments', + 'body' => 'issue_comment', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreatePullRequest' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*}/pullRequests', + 'body' => 'pull_request', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreatePullRequestComment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments', + 'body' => 'pull_request_comment', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateRepository' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/repositories', + 'body' => 'repository', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'repository_id', + ], + ], + 'DeleteBranchRule' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/branchRules/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteHook' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/hooks/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteInstance' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteIssue' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/issues/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteIssueComment' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/issues/*/issueComments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeletePullRequestComment' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*/pullRequestComments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteRepository' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'FetchBlob' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{repository=projects/*/locations/*/repositories/*}:fetchBlob', + 'placeholders' => [ + 'repository' => [ + 'getters' => [ + 'getRepository', + ], + ], + ], + ], + 'FetchTree' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{repository=projects/*/locations/*/repositories/*}:fetchTree', + 'placeholders' => [ + 'repository' => [ + 'getters' => [ + 'getRepository', + ], + ], + ], + ], + 'GetBranchRule' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/branchRules/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetHook' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/hooks/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicyRepo' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/repositories/*}:getIamPolicy', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'GetInstance' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIssue' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/issues/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIssueComment' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/issues/*/issueComments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetPullRequest' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetPullRequestComment' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*/pullRequestComments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetRepository' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListBranchRules' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*}/branchRules', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListHooks' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*}/hooks', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListInstances' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/instances', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListIssueComments' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*/issues/*}/issueComments', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListIssues' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*}/issues', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListPullRequestComments' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListPullRequestFileDiffs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:listFileDiffs', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListPullRequests' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*}/pullRequests', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListRepositories' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/repositories', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'MergePullRequest' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:merge', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'OpenIssue' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/issues/*}:open', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'OpenPullRequest' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:open', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ResolvePullRequestComments' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:resolve', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SetIamPolicyRepo' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/repositories/*}:setIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissionsRepo' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/repositories/*}:testIamPermissions', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'UnresolvePullRequestComments' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:unresolve', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateBranchRule' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{branch_rule.name=projects/*/locations/*/repositories/*/branchRules/*}', + 'body' => 'branch_rule', + 'placeholders' => [ + 'branch_rule.name' => [ + 'getters' => [ + 'getBranchRule', + 'getName', + ], + ], + ], + ], + 'UpdateHook' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{hook.name=projects/*/locations/*/repositories/*/hooks/*}', + 'body' => 'hook', + 'placeholders' => [ + 'hook.name' => [ + 'getters' => [ + 'getHook', + 'getName', + ], + ], + ], + ], + 'UpdateIssue' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{issue.name=projects/*/locations/*/repositories/*/issues/*}', + 'body' => 'issue', + 'placeholders' => [ + 'issue.name' => [ + 'getters' => [ + 'getIssue', + 'getName', + ], + ], + ], + ], + 'UpdateIssueComment' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{issue_comment.name=projects/*/locations/*/repositories/*/issues/*/issueComments/*}', + 'body' => 'issue_comment', + 'placeholders' => [ + 'issue_comment.name' => [ + 'getters' => [ + 'getIssueComment', + 'getName', + ], + ], + ], + ], + 'UpdatePullRequest' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{pull_request.name=projects/*/locations/*/repositories/*/pullRequests/*}', + 'body' => 'pull_request', + 'placeholders' => [ + 'pull_request.name' => [ + 'getters' => [ + 'getPullRequest', + 'getName', + ], + ], + ], + ], + 'UpdatePullRequestComment' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{pull_request_comment.name=projects/*/locations/*/repositories/*/pullRequests/*/pullRequestComments/*}', + 'body' => 'pull_request_comment', + 'placeholders' => [ + 'pull_request_comment.name' => [ + 'getters' => [ + 'getPullRequestComment', + 'getName', + ], + ], + ], + ], + 'UpdateRepository' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{repository.name=projects/*/locations/*/repositories/*}', + 'body' => 'repository', + 'placeholders' => [ + 'repository.name' => [ + 'getters' => [ + 'getRepository', + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/instances/*}:getIamPolicy', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/instances/*}:setIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/instances/*}:testIamPermissions', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/SecureSourceManager/v1/tests/Unit/V1/Client/SecureSourceManagerClientTest.php b/owl-bot-staging/SecureSourceManager/v1/tests/Unit/V1/Client/SecureSourceManagerClientTest.php new file mode 100644 index 000000000000..34a8e55b0034 --- /dev/null +++ b/owl-bot-staging/SecureSourceManager/v1/tests/Unit/V1/Client/SecureSourceManagerClientTest.php @@ -0,0 +1,6050 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SecureSourceManagerClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SecureSourceManagerClient($options); + } + + /** @test */ + public function batchCreatePullRequestCommentsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchCreatePullRequestCommentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new BatchCreatePullRequestCommentsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchCreatePullRequestCommentsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); + $requests = []; + $request = (new BatchCreatePullRequestCommentsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + $response = $gapicClient->batchCreatePullRequestComments($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/BatchCreatePullRequestComments', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchCreatePullRequestCommentsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function batchCreatePullRequestCommentsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchCreatePullRequestCommentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); + $requests = []; + $request = (new BatchCreatePullRequestCommentsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + $response = $gapicClient->batchCreatePullRequestComments($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchCreatePullRequestCommentsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function closeIssueTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/closeIssueTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $title = 'title110371416'; + $body = 'body3029410'; + $etag2 = 'etag2-1293302904'; + $expectedResponse = new Issue(); + $expectedResponse->setName($name2); + $expectedResponse->setTitle($title); + $expectedResponse->setBody($body); + $expectedResponse->setEtag($etag2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/closeIssueTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]'); + $request = (new CloseIssueRequest()) + ->setName($formattedName); + $response = $gapicClient->closeIssue($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/CloseIssue', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/closeIssueTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function closeIssueExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/closeIssueTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]'); + $request = (new CloseIssueRequest()) + ->setName($formattedName); + $response = $gapicClient->closeIssue($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/closeIssueTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function closePullRequestTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/closePullRequestTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $title = 'title110371416'; + $body = 'body3029410'; + $expectedResponse = new PullRequest(); + $expectedResponse->setName($name2); + $expectedResponse->setTitle($title); + $expectedResponse->setBody($body); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/closePullRequestTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); + $request = (new ClosePullRequestRequest()) + ->setName($formattedName); + $response = $gapicClient->closePullRequest($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/ClosePullRequest', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/closePullRequestTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function closePullRequestExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/closePullRequestTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); + $request = (new ClosePullRequestRequest()) + ->setName($formattedName); + $response = $gapicClient->closePullRequest($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/closePullRequestTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createBranchRuleTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createBranchRuleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $includePattern = 'includePattern-1182351623'; + $disabled = true; + $requirePullRequest = false; + $minimumReviewsCount = 672799098; + $minimumApprovalsCount = 579210129; + $requireCodeOwnerApproval = false; + $requireCommentsResolved = false; + $allowStaleReviews = false; + $requireLinearHistory = true; + $expectedResponse = new BranchRule(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $expectedResponse->setIncludePattern($includePattern); + $expectedResponse->setDisabled($disabled); + $expectedResponse->setRequirePullRequest($requirePullRequest); + $expectedResponse->setMinimumReviewsCount($minimumReviewsCount); + $expectedResponse->setMinimumApprovalsCount($minimumApprovalsCount); + $expectedResponse->setRequireCodeOwnerApproval($requireCodeOwnerApproval); + $expectedResponse->setRequireCommentsResolved($requireCommentsResolved); + $expectedResponse->setAllowStaleReviews($allowStaleReviews); + $expectedResponse->setRequireLinearHistory($requireLinearHistory); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createBranchRuleTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); + $branchRule = new BranchRule(); + $branchRuleId = 'branchRuleId786871201'; + $request = (new CreateBranchRuleRequest()) + ->setParent($formattedParent) + ->setBranchRule($branchRule) + ->setBranchRuleId($branchRuleId); + $response = $gapicClient->createBranchRule($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/CreateBranchRule', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getBranchRule(); + $this->assertProtobufEquals($branchRule, $actualValue); + $actualValue = $actualApiRequestObject->getBranchRuleId(); + $this->assertProtobufEquals($branchRuleId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createBranchRuleTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createBranchRuleExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createBranchRuleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); + $branchRule = new BranchRule(); + $branchRuleId = 'branchRuleId786871201'; + $request = (new CreateBranchRuleRequest()) + ->setParent($formattedParent) + ->setBranchRule($branchRule) + ->setBranchRuleId($branchRuleId); + $response = $gapicClient->createBranchRule($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createBranchRuleTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createHookTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createHookTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $targetUri = 'targetUri486946238'; + $disabled = true; + $uid = 'uid115792'; + $sensitiveQueryString = 'sensitiveQueryString1820021361'; + $expectedResponse = new Hook(); + $expectedResponse->setName($name); + $expectedResponse->setTargetUri($targetUri); + $expectedResponse->setDisabled($disabled); + $expectedResponse->setUid($uid); + $expectedResponse->setSensitiveQueryString($sensitiveQueryString); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createHookTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); + $hook = new Hook(); + $hookTargetUri = 'hookTargetUri737306680'; + $hook->setTargetUri($hookTargetUri); + $hookId = 'hookId1094731191'; + $request = (new CreateHookRequest()) + ->setParent($formattedParent) + ->setHook($hook) + ->setHookId($hookId); + $response = $gapicClient->createHook($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/CreateHook', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getHook(); + $this->assertProtobufEquals($hook, $actualValue); + $actualValue = $actualApiRequestObject->getHookId(); + $this->assertProtobufEquals($hookId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createHookTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createHookExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createHookTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); + $hook = new Hook(); + $hookTargetUri = 'hookTargetUri737306680'; + $hook->setTargetUri($hookTargetUri); + $hookId = 'hookId1094731191'; + $request = (new CreateHookRequest()) + ->setParent($formattedParent) + ->setHook($hook) + ->setHookId($hookId); + $response = $gapicClient->createHook($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createHookTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $kmsKey = 'kmsKey-591635343'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name); + $expectedResponse->setKmsKey($kmsKey); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $instanceId = 'instanceId-2101995259'; + $instance = new Instance(); + $request = (new CreateInstanceRequest()) + ->setParent($formattedParent) + ->setInstanceId($instanceId) + ->setInstance($instance); + $response = $gapicClient->createInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/CreateInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getInstanceId(); + $this->assertProtobufEquals($instanceId, $actualValue); + $actualValue = $actualApiRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $instanceId = 'instanceId-2101995259'; + $instance = new Instance(); + $request = (new CreateInstanceRequest()) + ->setParent($formattedParent) + ->setInstanceId($instanceId) + ->setInstance($instance); + $response = $gapicClient->createInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createIssueTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createIssueTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $title = 'title110371416'; + $body = 'body3029410'; + $etag = 'etag3123477'; + $expectedResponse = new Issue(); + $expectedResponse->setName($name); + $expectedResponse->setTitle($title); + $expectedResponse->setBody($body); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createIssueTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); + $issue = new Issue(); + $issueTitle = 'issueTitle1432889599'; + $issue->setTitle($issueTitle); + $request = (new CreateIssueRequest()) + ->setParent($formattedParent) + ->setIssue($issue); + $response = $gapicClient->createIssue($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/CreateIssue', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getIssue(); + $this->assertProtobufEquals($issue, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createIssueTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createIssueExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createIssueTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); + $issue = new Issue(); + $issueTitle = 'issueTitle1432889599'; + $issue->setTitle($issueTitle); + $request = (new CreateIssueRequest()) + ->setParent($formattedParent) + ->setIssue($issue); + $response = $gapicClient->createIssue($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createIssueTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createIssueCommentTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createIssueCommentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $body = 'body3029410'; + $expectedResponse = new IssueComment(); + $expectedResponse->setName($name); + $expectedResponse->setBody($body); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createIssueCommentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]'); + $issueComment = new IssueComment(); + $issueCommentBody = 'issueCommentBody1153532424'; + $issueComment->setBody($issueCommentBody); + $request = (new CreateIssueCommentRequest()) + ->setParent($formattedParent) + ->setIssueComment($issueComment); + $response = $gapicClient->createIssueComment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/CreateIssueComment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getIssueComment(); + $this->assertProtobufEquals($issueComment, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createIssueCommentTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createIssueCommentExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createIssueCommentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]'); + $issueComment = new IssueComment(); + $issueCommentBody = 'issueCommentBody1153532424'; + $issueComment->setBody($issueCommentBody); + $request = (new CreateIssueCommentRequest()) + ->setParent($formattedParent) + ->setIssueComment($issueComment); + $response = $gapicClient->createIssueComment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createIssueCommentTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createPullRequestTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createPullRequestTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $title = 'title110371416'; + $body = 'body3029410'; + $expectedResponse = new PullRequest(); + $expectedResponse->setName($name); + $expectedResponse->setTitle($title); + $expectedResponse->setBody($body); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createPullRequestTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); + $pullRequest = new PullRequest(); + $pullRequestTitle = 'pullRequestTitle13255662'; + $pullRequest->setTitle($pullRequestTitle); + $pullRequestBase = new Branch(); + $baseRef = 'baseRef-332628990'; + $pullRequestBase->setRef($baseRef); + $pullRequest->setBase($pullRequestBase); + $request = (new CreatePullRequestRequest()) + ->setParent($formattedParent) + ->setPullRequest($pullRequest); + $response = $gapicClient->createPullRequest($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/CreatePullRequest', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getPullRequest(); + $this->assertProtobufEquals($pullRequest, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createPullRequestTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createPullRequestExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createPullRequestTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); + $pullRequest = new PullRequest(); + $pullRequestTitle = 'pullRequestTitle13255662'; + $pullRequest->setTitle($pullRequestTitle); + $pullRequestBase = new Branch(); + $baseRef = 'baseRef-332628990'; + $pullRequestBase->setRef($baseRef); + $pullRequest->setBase($pullRequestBase); + $request = (new CreatePullRequestRequest()) + ->setParent($formattedParent) + ->setPullRequest($pullRequest); + $response = $gapicClient->createPullRequest($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createPullRequestTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createPullRequestCommentTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createPullRequestCommentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $expectedResponse = new PullRequestComment(); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createPullRequestCommentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); + $pullRequestComment = new PullRequestComment(); + $request = (new CreatePullRequestCommentRequest()) + ->setParent($formattedParent) + ->setPullRequestComment($pullRequestComment); + $response = $gapicClient->createPullRequestComment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/CreatePullRequestComment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getPullRequestComment(); + $this->assertProtobufEquals($pullRequestComment, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createPullRequestCommentTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createPullRequestCommentExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createPullRequestCommentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); + $pullRequestComment = new PullRequestComment(); + $request = (new CreatePullRequestCommentRequest()) + ->setParent($formattedParent) + ->setPullRequestComment($pullRequestComment); + $response = $gapicClient->createPullRequestComment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createPullRequestCommentTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createRepositoryTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createRepositoryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $instance = 'instance555127957'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new Repository(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setInstance($instance); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createRepositoryTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $repository = new Repository(); + $repositoryId = 'repositoryId1101683248'; + $request = (new CreateRepositoryRequest()) + ->setParent($formattedParent) + ->setRepository($repository) + ->setRepositoryId($repositoryId); + $response = $gapicClient->createRepository($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/CreateRepository', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getRepository(); + $this->assertProtobufEquals($repository, $actualValue); + $actualValue = $actualApiRequestObject->getRepositoryId(); + $this->assertProtobufEquals($repositoryId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createRepositoryTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createRepositoryExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createRepositoryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $repository = new Repository(); + $repositoryId = 'repositoryId1101683248'; + $request = (new CreateRepositoryRequest()) + ->setParent($formattedParent) + ->setRepository($repository) + ->setRepositoryId($repositoryId); + $response = $gapicClient->createRepository($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createRepositoryTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteBranchRuleTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteBranchRuleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteBranchRuleTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->branchRuleName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[BRANCH_RULE]'); + $request = (new DeleteBranchRuleRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteBranchRule($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/DeleteBranchRule', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteBranchRuleTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteBranchRuleExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteBranchRuleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->branchRuleName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[BRANCH_RULE]'); + $request = (new DeleteBranchRuleRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteBranchRule($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteBranchRuleTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteHookTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteHookTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteHookTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->hookName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[HOOK]'); + $request = (new DeleteHookRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteHook($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/DeleteHook', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteHookTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteHookExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteHookTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->hookName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[HOOK]'); + $request = (new DeleteHookRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteHook($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteHookTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new DeleteInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/DeleteInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new DeleteInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteIssueTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteIssueTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteIssueTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]'); + $request = (new DeleteIssueRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteIssue($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/DeleteIssue', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteIssueTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteIssueExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteIssueTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]'); + $request = (new DeleteIssueRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteIssue($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteIssueTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteIssueCommentTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteIssueCommentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteIssueCommentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->issueCommentName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]', '[COMMENT]'); + $request = (new DeleteIssueCommentRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteIssueComment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/DeleteIssueComment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteIssueCommentTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteIssueCommentExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteIssueCommentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->issueCommentName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]', '[COMMENT]'); + $request = (new DeleteIssueCommentRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteIssueComment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteIssueCommentTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deletePullRequestCommentTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deletePullRequestCommentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deletePullRequestCommentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->pullRequestCommentName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]', '[COMMENT]'); + $request = (new DeletePullRequestCommentRequest()) + ->setName($formattedName); + $response = $gapicClient->deletePullRequestComment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/DeletePullRequestComment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deletePullRequestCommentTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deletePullRequestCommentExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deletePullRequestCommentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->pullRequestCommentName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]', '[COMMENT]'); + $request = (new DeletePullRequestCommentRequest()) + ->setName($formattedName); + $response = $gapicClient->deletePullRequestComment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deletePullRequestCommentTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteRepositoryTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteRepositoryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteRepositoryTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); + $request = (new DeleteRepositoryRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteRepository($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/DeleteRepository', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteRepositoryTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteRepositoryExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteRepositoryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); + $request = (new DeleteRepositoryRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteRepository($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteRepositoryTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function fetchBlobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $sha2 = 'sha2109399391'; + $content = 'content951530617'; + $expectedResponse = new FetchBlobResponse(); + $expectedResponse->setSha($sha2); + $expectedResponse->setContent($content); + $transport->addResponse($expectedResponse); + // Mock request + $formattedRepository = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); + $sha = 'sha113836'; + $request = (new FetchBlobRequest()) + ->setRepository($formattedRepository) + ->setSha($sha); + $response = $gapicClient->fetchBlob($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/FetchBlob', $actualFuncCall); + $actualValue = $actualRequestObject->getRepository(); + $this->assertProtobufEquals($formattedRepository, $actualValue); + $actualValue = $actualRequestObject->getSha(); + $this->assertProtobufEquals($sha, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function fetchBlobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedRepository = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); + $sha = 'sha113836'; + $request = (new FetchBlobRequest()) + ->setRepository($formattedRepository) + ->setSha($sha); + try { + $gapicClient->fetchBlob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function fetchTreeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $treeEntriesElement = new TreeEntry(); + $treeEntries = [ + $treeEntriesElement, + ]; + $expectedResponse = new FetchTreeResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTreeEntries($treeEntries); + $transport->addResponse($expectedResponse); + // Mock request + $formattedRepository = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); + $request = (new FetchTreeRequest()) + ->setRepository($formattedRepository); + $response = $gapicClient->fetchTree($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTreeEntries()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/FetchTree', $actualFuncCall); + $actualValue = $actualRequestObject->getRepository(); + $this->assertProtobufEquals($formattedRepository, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function fetchTreeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedRepository = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); + $request = (new FetchTreeRequest()) + ->setRepository($formattedRepository); + try { + $gapicClient->fetchTree($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBranchRuleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $includePattern = 'includePattern-1182351623'; + $disabled = true; + $requirePullRequest = false; + $minimumReviewsCount = 672799098; + $minimumApprovalsCount = 579210129; + $requireCodeOwnerApproval = false; + $requireCommentsResolved = false; + $allowStaleReviews = false; + $requireLinearHistory = true; + $expectedResponse = new BranchRule(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $expectedResponse->setIncludePattern($includePattern); + $expectedResponse->setDisabled($disabled); + $expectedResponse->setRequirePullRequest($requirePullRequest); + $expectedResponse->setMinimumReviewsCount($minimumReviewsCount); + $expectedResponse->setMinimumApprovalsCount($minimumApprovalsCount); + $expectedResponse->setRequireCodeOwnerApproval($requireCodeOwnerApproval); + $expectedResponse->setRequireCommentsResolved($requireCommentsResolved); + $expectedResponse->setAllowStaleReviews($allowStaleReviews); + $expectedResponse->setRequireLinearHistory($requireLinearHistory); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->branchRuleName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[BRANCH_RULE]'); + $request = (new GetBranchRuleRequest()) + ->setName($formattedName); + $response = $gapicClient->getBranchRule($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/GetBranchRule', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBranchRuleExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->branchRuleName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[BRANCH_RULE]'); + $request = (new GetBranchRuleRequest()) + ->setName($formattedName); + try { + $gapicClient->getBranchRule($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getHookTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $targetUri = 'targetUri486946238'; + $disabled = true; + $uid = 'uid115792'; + $sensitiveQueryString = 'sensitiveQueryString1820021361'; + $expectedResponse = new Hook(); + $expectedResponse->setName($name2); + $expectedResponse->setTargetUri($targetUri); + $expectedResponse->setDisabled($disabled); + $expectedResponse->setUid($uid); + $expectedResponse->setSensitiveQueryString($sensitiveQueryString); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->hookName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[HOOK]'); + $request = (new GetHookRequest()) + ->setName($formattedName); + $response = $gapicClient->getHook($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/GetHook', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getHookExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->hookName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[HOOK]'); + $request = (new GetHookRequest()) + ->setName($formattedName); + try { + $gapicClient->getHook($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyRepoTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicyRepo($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/GetIamPolicyRepo', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyRepoExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicyRepo($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInstanceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $kmsKey = 'kmsKey-591635343'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setKmsKey($kmsKey); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->getInstance($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/GetInstance', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInstanceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetInstanceRequest()) + ->setName($formattedName); + try { + $gapicClient->getInstance($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIssueTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $title = 'title110371416'; + $body = 'body3029410'; + $etag = 'etag3123477'; + $expectedResponse = new Issue(); + $expectedResponse->setName($name2); + $expectedResponse->setTitle($title); + $expectedResponse->setBody($body); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]'); + $request = (new GetIssueRequest()) + ->setName($formattedName); + $response = $gapicClient->getIssue($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/GetIssue', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIssueExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]'); + $request = (new GetIssueRequest()) + ->setName($formattedName); + try { + $gapicClient->getIssue($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIssueCommentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $body = 'body3029410'; + $expectedResponse = new IssueComment(); + $expectedResponse->setName($name2); + $expectedResponse->setBody($body); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->issueCommentName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]', '[COMMENT]'); + $request = (new GetIssueCommentRequest()) + ->setName($formattedName); + $response = $gapicClient->getIssueComment($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/GetIssueComment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIssueCommentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->issueCommentName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]', '[COMMENT]'); + $request = (new GetIssueCommentRequest()) + ->setName($formattedName); + try { + $gapicClient->getIssueComment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPullRequestTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $title = 'title110371416'; + $body = 'body3029410'; + $expectedResponse = new PullRequest(); + $expectedResponse->setName($name2); + $expectedResponse->setTitle($title); + $expectedResponse->setBody($body); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); + $request = (new GetPullRequestRequest()) + ->setName($formattedName); + $response = $gapicClient->getPullRequest($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/GetPullRequest', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPullRequestExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); + $request = (new GetPullRequestRequest()) + ->setName($formattedName); + try { + $gapicClient->getPullRequest($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPullRequestCommentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new PullRequestComment(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->pullRequestCommentName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]', '[COMMENT]'); + $request = (new GetPullRequestCommentRequest()) + ->setName($formattedName); + $response = $gapicClient->getPullRequestComment($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/GetPullRequestComment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPullRequestCommentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->pullRequestCommentName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]', '[COMMENT]'); + $request = (new GetPullRequestCommentRequest()) + ->setName($formattedName); + try { + $gapicClient->getPullRequestComment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRepositoryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $instance = 'instance555127957'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new Repository(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setInstance($instance); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); + $request = (new GetRepositoryRequest()) + ->setName($formattedName); + $response = $gapicClient->getRepository($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/GetRepository', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRepositoryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); + $request = (new GetRepositoryRequest()) + ->setName($formattedName); + try { + $gapicClient->getRepository($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBranchRulesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $branchRulesElement = new BranchRule(); + $branchRules = [ + $branchRulesElement, + ]; + $expectedResponse = new ListBranchRulesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setBranchRules($branchRules); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); + $request = (new ListBranchRulesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listBranchRules($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getBranchRules()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/ListBranchRules', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBranchRulesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); + $request = (new ListBranchRulesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listBranchRules($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listHooksTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $hooksElement = new Hook(); + $hooks = [ + $hooksElement, + ]; + $expectedResponse = new ListHooksResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setHooks($hooks); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); + $request = (new ListHooksRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listHooks($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getHooks()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/ListHooks', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listHooksExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); + $request = (new ListHooksRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listHooks($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInstancesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $instancesElement = new Instance(); + $instances = [ + $instancesElement, + ]; + $expectedResponse = new ListInstancesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setInstances($instances); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListInstancesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listInstances($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getInstances()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/ListInstances', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInstancesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListInstancesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listInstances($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listIssueCommentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $issueCommentsElement = new IssueComment(); + $issueComments = [ + $issueCommentsElement, + ]; + $expectedResponse = new ListIssueCommentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setIssueComments($issueComments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]'); + $request = (new ListIssueCommentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listIssueComments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getIssueComments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/ListIssueComments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listIssueCommentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]'); + $request = (new ListIssueCommentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listIssueComments($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listIssuesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $issuesElement = new Issue(); + $issues = [ + $issuesElement, + ]; + $expectedResponse = new ListIssuesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setIssues($issues); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); + $request = (new ListIssuesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listIssues($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getIssues()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/ListIssues', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listIssuesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); + $request = (new ListIssuesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listIssues($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPullRequestCommentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $pullRequestCommentsElement = new PullRequestComment(); + $pullRequestComments = [ + $pullRequestCommentsElement, + ]; + $expectedResponse = new ListPullRequestCommentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPullRequestComments($pullRequestComments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); + $request = (new ListPullRequestCommentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listPullRequestComments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPullRequestComments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/ListPullRequestComments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPullRequestCommentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); + $request = (new ListPullRequestCommentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listPullRequestComments($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPullRequestFileDiffsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $fileDiffsElement = new FileDiff(); + $fileDiffs = [ + $fileDiffsElement, + ]; + $expectedResponse = new ListPullRequestFileDiffsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setFileDiffs($fileDiffs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); + $request = (new ListPullRequestFileDiffsRequest()) + ->setName($formattedName); + $response = $gapicClient->listPullRequestFileDiffs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getFileDiffs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/ListPullRequestFileDiffs', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPullRequestFileDiffsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); + $request = (new ListPullRequestFileDiffsRequest()) + ->setName($formattedName); + try { + $gapicClient->listPullRequestFileDiffs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPullRequestsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $pullRequestsElement = new PullRequest(); + $pullRequests = [ + $pullRequestsElement, + ]; + $expectedResponse = new ListPullRequestsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPullRequests($pullRequests); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); + $request = (new ListPullRequestsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listPullRequests($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPullRequests()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/ListPullRequests', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPullRequestsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); + $request = (new ListPullRequestsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listPullRequests($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRepositoriesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $repositoriesElement = new Repository(); + $repositories = [ + $repositoriesElement, + ]; + $expectedResponse = new ListRepositoriesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRepositories($repositories); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListRepositoriesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listRepositories($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRepositories()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/ListRepositories', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRepositoriesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListRepositoriesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listRepositories($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function mergePullRequestTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/mergePullRequestTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $title = 'title110371416'; + $body = 'body3029410'; + $expectedResponse = new PullRequest(); + $expectedResponse->setName($name2); + $expectedResponse->setTitle($title); + $expectedResponse->setBody($body); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/mergePullRequestTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); + $request = (new MergePullRequestRequest()) + ->setName($formattedName); + $response = $gapicClient->mergePullRequest($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/MergePullRequest', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/mergePullRequestTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function mergePullRequestExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/mergePullRequestTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); + $request = (new MergePullRequestRequest()) + ->setName($formattedName); + $response = $gapicClient->mergePullRequest($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/mergePullRequestTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function openIssueTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/openIssueTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $title = 'title110371416'; + $body = 'body3029410'; + $etag2 = 'etag2-1293302904'; + $expectedResponse = new Issue(); + $expectedResponse->setName($name2); + $expectedResponse->setTitle($title); + $expectedResponse->setBody($body); + $expectedResponse->setEtag($etag2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/openIssueTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]'); + $request = (new OpenIssueRequest()) + ->setName($formattedName); + $response = $gapicClient->openIssue($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/OpenIssue', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/openIssueTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function openIssueExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/openIssueTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]'); + $request = (new OpenIssueRequest()) + ->setName($formattedName); + $response = $gapicClient->openIssue($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/openIssueTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function openPullRequestTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/openPullRequestTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $title = 'title110371416'; + $body = 'body3029410'; + $expectedResponse = new PullRequest(); + $expectedResponse->setName($name2); + $expectedResponse->setTitle($title); + $expectedResponse->setBody($body); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/openPullRequestTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); + $request = (new OpenPullRequestRequest()) + ->setName($formattedName); + $response = $gapicClient->openPullRequest($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/OpenPullRequest', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/openPullRequestTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function openPullRequestExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/openPullRequestTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); + $request = (new OpenPullRequestRequest()) + ->setName($formattedName); + $response = $gapicClient->openPullRequest($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/openPullRequestTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function resolvePullRequestCommentsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resolvePullRequestCommentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ResolvePullRequestCommentsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/resolvePullRequestCommentsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); + $formattedNames = [ + $gapicClient->pullRequestCommentName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]', '[COMMENT]'), + ]; + $request = (new ResolvePullRequestCommentsRequest()) + ->setParent($formattedParent) + ->setNames($formattedNames); + $response = $gapicClient->resolvePullRequestComments($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/ResolvePullRequestComments', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resolvePullRequestCommentsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function resolvePullRequestCommentsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resolvePullRequestCommentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); + $formattedNames = [ + $gapicClient->pullRequestCommentName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]', '[COMMENT]'), + ]; + $request = (new ResolvePullRequestCommentsRequest()) + ->setParent($formattedParent) + ->setNames($formattedNames); + $response = $gapicClient->resolvePullRequestComments($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resolvePullRequestCommentsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function setIamPolicyRepoTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicyRepo($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/SetIamPolicyRepo', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyRepoExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicyRepo($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsRepoTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissionsRepo($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/TestIamPermissionsRepo', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsRepoExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissionsRepo($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function unresolvePullRequestCommentsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/unresolvePullRequestCommentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new UnresolvePullRequestCommentsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/unresolvePullRequestCommentsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); + $formattedNames = [ + $gapicClient->pullRequestCommentName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]', '[COMMENT]'), + ]; + $request = (new UnresolvePullRequestCommentsRequest()) + ->setParent($formattedParent) + ->setNames($formattedNames); + $response = $gapicClient->unresolvePullRequestComments($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/UnresolvePullRequestComments', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/unresolvePullRequestCommentsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function unresolvePullRequestCommentsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/unresolvePullRequestCommentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); + $formattedNames = [ + $gapicClient->pullRequestCommentName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]', '[COMMENT]'), + ]; + $request = (new UnresolvePullRequestCommentsRequest()) + ->setParent($formattedParent) + ->setNames($formattedNames); + $response = $gapicClient->unresolvePullRequestComments($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/unresolvePullRequestCommentsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateBranchRuleTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateBranchRuleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $includePattern = 'includePattern-1182351623'; + $disabled = true; + $requirePullRequest = false; + $minimumReviewsCount = 672799098; + $minimumApprovalsCount = 579210129; + $requireCodeOwnerApproval = false; + $requireCommentsResolved = false; + $allowStaleReviews = false; + $requireLinearHistory = true; + $expectedResponse = new BranchRule(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $expectedResponse->setIncludePattern($includePattern); + $expectedResponse->setDisabled($disabled); + $expectedResponse->setRequirePullRequest($requirePullRequest); + $expectedResponse->setMinimumReviewsCount($minimumReviewsCount); + $expectedResponse->setMinimumApprovalsCount($minimumApprovalsCount); + $expectedResponse->setRequireCodeOwnerApproval($requireCodeOwnerApproval); + $expectedResponse->setRequireCommentsResolved($requireCommentsResolved); + $expectedResponse->setAllowStaleReviews($allowStaleReviews); + $expectedResponse->setRequireLinearHistory($requireLinearHistory); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateBranchRuleTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $branchRule = new BranchRule(); + $request = (new UpdateBranchRuleRequest()) + ->setBranchRule($branchRule); + $response = $gapicClient->updateBranchRule($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/UpdateBranchRule', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getBranchRule(); + $this->assertProtobufEquals($branchRule, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateBranchRuleTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateBranchRuleExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateBranchRuleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $branchRule = new BranchRule(); + $request = (new UpdateBranchRuleRequest()) + ->setBranchRule($branchRule); + $response = $gapicClient->updateBranchRule($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateBranchRuleTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateHookTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateHookTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $targetUri = 'targetUri486946238'; + $disabled = true; + $uid = 'uid115792'; + $sensitiveQueryString = 'sensitiveQueryString1820021361'; + $expectedResponse = new Hook(); + $expectedResponse->setName($name); + $expectedResponse->setTargetUri($targetUri); + $expectedResponse->setDisabled($disabled); + $expectedResponse->setUid($uid); + $expectedResponse->setSensitiveQueryString($sensitiveQueryString); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateHookTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $hook = new Hook(); + $hookTargetUri = 'hookTargetUri737306680'; + $hook->setTargetUri($hookTargetUri); + $request = (new UpdateHookRequest()) + ->setHook($hook); + $response = $gapicClient->updateHook($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/UpdateHook', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getHook(); + $this->assertProtobufEquals($hook, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateHookTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateHookExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateHookTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $hook = new Hook(); + $hookTargetUri = 'hookTargetUri737306680'; + $hook->setTargetUri($hookTargetUri); + $request = (new UpdateHookRequest()) + ->setHook($hook); + $response = $gapicClient->updateHook($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateHookTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateIssueTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateIssueTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $title = 'title110371416'; + $body = 'body3029410'; + $etag = 'etag3123477'; + $expectedResponse = new Issue(); + $expectedResponse->setName($name); + $expectedResponse->setTitle($title); + $expectedResponse->setBody($body); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateIssueTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $issue = new Issue(); + $issueTitle = 'issueTitle1432889599'; + $issue->setTitle($issueTitle); + $request = (new UpdateIssueRequest()) + ->setIssue($issue); + $response = $gapicClient->updateIssue($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/UpdateIssue', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getIssue(); + $this->assertProtobufEquals($issue, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateIssueTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateIssueExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateIssueTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $issue = new Issue(); + $issueTitle = 'issueTitle1432889599'; + $issue->setTitle($issueTitle); + $request = (new UpdateIssueRequest()) + ->setIssue($issue); + $response = $gapicClient->updateIssue($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateIssueTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateIssueCommentTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateIssueCommentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $body = 'body3029410'; + $expectedResponse = new IssueComment(); + $expectedResponse->setName($name); + $expectedResponse->setBody($body); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateIssueCommentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $issueComment = new IssueComment(); + $issueCommentBody = 'issueCommentBody1153532424'; + $issueComment->setBody($issueCommentBody); + $request = (new UpdateIssueCommentRequest()) + ->setIssueComment($issueComment); + $response = $gapicClient->updateIssueComment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/UpdateIssueComment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getIssueComment(); + $this->assertProtobufEquals($issueComment, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateIssueCommentTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateIssueCommentExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateIssueCommentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $issueComment = new IssueComment(); + $issueCommentBody = 'issueCommentBody1153532424'; + $issueComment->setBody($issueCommentBody); + $request = (new UpdateIssueCommentRequest()) + ->setIssueComment($issueComment); + $response = $gapicClient->updateIssueComment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateIssueCommentTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updatePullRequestTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updatePullRequestTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $title = 'title110371416'; + $body = 'body3029410'; + $expectedResponse = new PullRequest(); + $expectedResponse->setName($name); + $expectedResponse->setTitle($title); + $expectedResponse->setBody($body); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updatePullRequestTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $pullRequest = new PullRequest(); + $pullRequestTitle = 'pullRequestTitle13255662'; + $pullRequest->setTitle($pullRequestTitle); + $pullRequestBase = new Branch(); + $baseRef = 'baseRef-332628990'; + $pullRequestBase->setRef($baseRef); + $pullRequest->setBase($pullRequestBase); + $request = (new UpdatePullRequestRequest()) + ->setPullRequest($pullRequest); + $response = $gapicClient->updatePullRequest($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/UpdatePullRequest', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getPullRequest(); + $this->assertProtobufEquals($pullRequest, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updatePullRequestTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updatePullRequestExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updatePullRequestTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $pullRequest = new PullRequest(); + $pullRequestTitle = 'pullRequestTitle13255662'; + $pullRequest->setTitle($pullRequestTitle); + $pullRequestBase = new Branch(); + $baseRef = 'baseRef-332628990'; + $pullRequestBase->setRef($baseRef); + $pullRequest->setBase($pullRequestBase); + $request = (new UpdatePullRequestRequest()) + ->setPullRequest($pullRequest); + $response = $gapicClient->updatePullRequest($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updatePullRequestTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updatePullRequestCommentTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updatePullRequestCommentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $expectedResponse = new PullRequestComment(); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updatePullRequestCommentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $pullRequestComment = new PullRequestComment(); + $request = (new UpdatePullRequestCommentRequest()) + ->setPullRequestComment($pullRequestComment); + $response = $gapicClient->updatePullRequestComment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/UpdatePullRequestComment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getPullRequestComment(); + $this->assertProtobufEquals($pullRequestComment, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updatePullRequestCommentTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updatePullRequestCommentExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updatePullRequestCommentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $pullRequestComment = new PullRequestComment(); + $request = (new UpdatePullRequestCommentRequest()) + ->setPullRequestComment($pullRequestComment); + $response = $gapicClient->updatePullRequestComment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updatePullRequestCommentTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateRepositoryTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateRepositoryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $instance = 'instance555127957'; + $uid = 'uid115792'; + $etag = 'etag3123477'; + $expectedResponse = new Repository(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setInstance($instance); + $expectedResponse->setUid($uid); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateRepositoryTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $repository = new Repository(); + $request = (new UpdateRepositoryRequest()) + ->setRepository($repository); + $response = $gapicClient->updateRepository($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/UpdateRepository', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getRepository(); + $this->assertProtobufEquals($repository, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateRepositoryTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateRepositoryExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateRepositoryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $repository = new Repository(); + $request = (new UpdateRepositoryRequest()) + ->setRepository($repository); + $response = $gapicClient->updateRepository($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateRepositoryTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchCreatePullRequestCommentsAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchCreatePullRequestCommentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new BatchCreatePullRequestCommentsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchCreatePullRequestCommentsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); + $requests = []; + $request = (new BatchCreatePullRequestCommentsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + $response = $gapicClient->batchCreatePullRequestCommentsAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/BatchCreatePullRequestComments', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchCreatePullRequestCommentsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} From 9c00f801f5ac512a642703ed7a90318e7bdb3a1d Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 26 Mar 2026 23:11:24 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../metadata/V1/SecureSourceManager.php | 3 +- .../batch_create_pull_request_comments.php | 2 +- .../list_locations.php | 16 + .../update_branch_rule.php | 5 +- .../SecureSourceManagerClient/update_hook.php | 3 - SecureSourceManager/src/V1/BranchRule.php | 58 +- .../V1/Client/SecureSourceManagerClient.php | 18 +- .../src/V1/CreateInstanceRequest.php | 6 +- .../src/V1/DeleteInstanceRequest.php | 40 +- SecureSourceManager/src/V1/Hook.php | 6 +- SecureSourceManager/src/V1/Instance.php | 30 +- .../src/V1/Instance/PrivateConfig.php | 44 + .../PrivateConfig/CustomHostConfig.php | 0 .../src/V1/ListBranchRulesRequest.php | 18 + .../src/V1/ListHooksRequest.php | 16 +- .../src/V1/ListInstancesRequest.php | 64 +- .../src/V1/ListIssueCommentsRequest.php | 16 +- .../src/V1/ListIssuesRequest.php | 16 +- .../src/V1/ListPullRequestCommentsRequest.php | 20 +- .../V1/ListPullRequestFileDiffsRequest.php | 16 +- .../src/V1/ListPullRequestsRequest.php | 16 +- .../src/V1/ListRepositoriesRequest.php | 30 +- SecureSourceManager/src/V1/PullRequest.php | 22 +- SecureSourceManager/src/V1/Repository.php | 20 +- .../src/V1/UpdateBranchRuleRequest.php | 16 +- .../src/V1/UpdateHookRequest.php | 16 +- ...cure_source_manager_rest_client_config.php | 6 - .../Client/SecureSourceManagerClientTest.php | 23 +- .../V1/SecureSourceManager.php | 35 - .../BatchCreatePullRequestCommentsRequest.php | 142 - ...BatchCreatePullRequestCommentsResponse.php | 67 - .../SecureSourceManager/V1/BranchRule.php | 658 -- .../V1/BranchRule/Check.php | 67 - .../V1/CloseIssueRequest.php | 133 - .../V1/ClosePullRequestRequest.php | 91 - .../V1/CreateBranchRuleRequest.php | 141 - .../V1/CreateHookRequest.php | 188 - .../V1/CreateInstanceRequest.php | 237 - .../V1/CreateIssueCommentRequest.php | 132 - .../V1/CreateIssueRequest.php | 132 - .../V1/CreatePullRequestCommentRequest.php | 137 - .../V1/CreatePullRequestRequest.php | 132 - .../V1/CreateRepositoryRequest.php | 178 - .../V1/DeleteBranchRuleRequest.php | 111 - .../V1/DeleteHookRequest.php | 91 - .../V1/DeleteInstanceRequest.php | 189 - .../V1/DeleteIssueCommentRequest.php | 91 - .../V1/DeleteIssueRequest.php | 133 - .../V1/DeletePullRequestCommentRequest.php | 92 - .../V1/DeleteRepositoryRequest.php | 129 - .../V1/FetchBlobRequest.php | 109 - .../V1/FetchBlobResponse.php | 101 - .../V1/FetchTreeRequest.php | 223 - .../V1/FetchTreeResponse.php | 101 - .../Cloud/SecureSourceManager/V1/FileDiff.php | 170 - .../V1/FileDiff/Action.php | 68 - .../V1/GetBranchRuleRequest.php | 91 - .../SecureSourceManager/V1/GetHookRequest.php | 91 - .../V1/GetInstanceRequest.php | 81 - .../V1/GetIssueCommentRequest.php | 91 - .../V1/GetIssueRequest.php | 91 - .../V1/GetPullRequestCommentRequest.php | 91 - .../V1/GetPullRequestRequest.php | 91 - .../V1/GetRepositoryRequest.php | 91 - .../Cloud/SecureSourceManager/V1/Hook.php | 381 -- .../V1/Hook/HookEventType.php | 60 - .../V1/Hook/PushOption.php | 77 - .../Cloud/SecureSourceManager/V1/Instance.php | 483 -- .../V1/Instance/HostConfig.php | 169 - .../V1/Instance/PrivateConfig.php | 267 - .../SecureSourceManager/V1/Instance/State.php | 82 - .../V1/Instance/StateNote.php | 62 - .../WorkforceIdentityFederationConfig.php | 68 - .../Cloud/SecureSourceManager/V1/Issue.php | 351 - .../SecureSourceManager/V1/Issue/State.php | 61 - .../SecureSourceManager/V1/IssueComment.php | 197 - .../V1/ListBranchRulesRequest.php | 145 - .../V1/ListBranchRulesResponse.php | 101 - .../V1/ListHooksRequest.php | 153 - .../V1/ListHooksResponse.php | 101 - .../V1/ListInstancesRequest.php | 221 - .../V1/ListInstancesResponse.php | 133 - .../V1/ListIssueCommentsRequest.php | 158 - .../V1/ListIssueCommentsResponse.php | 101 - .../V1/ListIssuesRequest.php | 192 - .../V1/ListIssuesResponse.php | 101 - .../V1/ListPullRequestCommentsRequest.php | 158 - .../V1/ListPullRequestCommentsResponse.php | 105 - .../V1/ListPullRequestFileDiffsRequest.php | 164 - .../V1/ListPullRequestFileDiffsResponse.php | 102 - .../V1/ListPullRequestsRequest.php | 158 - .../V1/ListPullRequestsResponse.php | 101 - .../V1/ListRepositoriesRequest.php | 241 - .../V1/ListRepositoriesResponse.php | 99 - .../V1/MergePullRequestRequest.php | 91 - .../V1/OpenIssueRequest.php | 133 - .../V1/OpenPullRequestRequest.php | 91 - .../V1/OperationMetadata.php | 307 - .../SecureSourceManager/V1/PullRequest.php | 406 -- .../V1/PullRequest/Branch.php | 101 - .../V1/PullRequest/State.php | 68 - .../V1/PullRequestComment.php | 271 - .../V1/PullRequestComment/Code.php | 255 - .../V1/PullRequestComment/Comment.php | 67 - .../V1/PullRequestComment/Position.php | 105 - .../V1/PullRequestComment/Review.php | 135 - .../PullRequestComment/Review/ActionType.php | 68 - .../SecureSourceManager/V1/Repository.php | 419 -- .../V1/Repository/InitialConfig.php | 665 -- .../V1/Repository/URIs.php | 139 - .../V1/ResolvePullRequestCommentsRequest.php | 180 - .../V1/ResolvePullRequestCommentsResponse.php | 67 - .../SecureSourceManager/V1/TreeEntry.php | 211 - .../V1/TreeEntry/ObjectType.php | 68 - .../UnresolvePullRequestCommentsRequest.php | 180 - .../UnresolvePullRequestCommentsResponse.php | 67 - .../V1/UpdateBranchRuleRequest.php | 187 - .../V1/UpdateHookRequest.php | 156 - .../V1/UpdateIssueCommentRequest.php | 156 - .../V1/UpdateIssueRequest.php | 156 - .../V1/UpdatePullRequestCommentRequest.php | 146 - .../V1/UpdatePullRequestRequest.php | 156 - .../V1/UpdateRepositoryRequest.php | 194 - .../batch_create_pull_request_comments.php | 114 - .../SecureSourceManagerClient/close_issue.php | 90 - .../close_pull_request.php | 90 - .../create_branch_rule.php | 91 - .../SecureSourceManagerClient/create_hook.php | 100 - .../create_instance.php | 88 - .../create_issue.php | 93 - .../create_issue_comment.php | 94 - .../create_pull_request.php | 102 - .../create_pull_request_comment.php | 96 - .../create_repository.php | 94 - .../delete_branch_rule.php | 84 - .../SecureSourceManagerClient/delete_hook.php | 87 - .../delete_instance.php | 80 - .../delete_issue.php | 87 - .../delete_issue_comment.php | 88 - .../delete_pull_request_comment.php | 88 - .../delete_repository.php | 86 - .../SecureSourceManagerClient/fetch_blob.php | 80 - .../SecureSourceManagerClient/fetch_tree.php | 82 - .../get_branch_rule.php | 78 - .../V1/SecureSourceManagerClient/get_hook.php | 78 - .../get_iam_policy.php | 72 - .../get_iam_policy_repo.php | 71 - .../get_instance.php | 71 - .../SecureSourceManagerClient/get_issue.php | 78 - .../get_issue_comment.php | 79 - .../get_location.php | 57 - .../get_pull_request.php | 78 - .../get_pull_request_comment.php | 79 - .../get_repository.php | 77 - .../list_branch_rules.php | 79 - .../SecureSourceManagerClient/list_hooks.php | 80 - .../list_instances.php | 76 - .../list_issue_comments.php | 82 - .../SecureSourceManagerClient/list_issues.php | 81 - .../list_locations.php | 78 - .../list_pull_request_comments.php | 82 - .../list_pull_request_file_diffs.php | 83 - .../list_pull_requests.php | 81 - .../list_repositories.php | 79 - .../merge_pull_request.php | 90 - .../SecureSourceManagerClient/open_issue.php | 90 - .../open_pull_request.php | 90 - .../resolve_pull_request_comments.php | 108 - .../set_iam_policy.php | 77 - .../set_iam_policy_repo.php | 73 - .../test_iam_permissions.php | 84 - .../test_iam_permissions_repo.php | 79 - .../unresolve_pull_request_comments.php | 108 - .../update_branch_rule.php | 71 - .../SecureSourceManagerClient/update_hook.php | 84 - .../update_issue.php | 84 - .../update_issue_comment.php | 84 - .../update_pull_request.php | 90 - .../update_pull_request_comment.php | 71 - .../update_repository.php | 71 - .../V1/Client/SecureSourceManagerClient.php | 2192 ------ .../v1/src/V1/gapic_metadata.json | 303 - .../secure_source_manager_client_config.json | 319 - ...ecure_source_manager_descriptor_config.php | 1036 --- ...cure_source_manager_rest_client_config.php | 753 -- .../Client/SecureSourceManagerClientTest.php | 6050 ----------------- 186 files changed, 355 insertions(+), 30464 deletions(-) rename {owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager => SecureSourceManager/src}/V1/Instance/PrivateConfig/CustomHostConfig.php (100%) delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/GPBMetadata/Google/Cloud/Securesourcemanager/V1/SecureSourceManager.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BatchCreatePullRequestCommentsRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BatchCreatePullRequestCommentsResponse.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BranchRule.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BranchRule/Check.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CloseIssueRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ClosePullRequestRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateBranchRuleRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateHookRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateInstanceRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateIssueCommentRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateIssueRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreatePullRequestCommentRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreatePullRequestRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateRepositoryRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteBranchRuleRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteHookRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteInstanceRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteIssueCommentRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteIssueRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeletePullRequestCommentRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteRepositoryRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchBlobRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchBlobResponse.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchTreeRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchTreeResponse.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FileDiff.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FileDiff/Action.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetBranchRuleRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetHookRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetInstanceRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetIssueCommentRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetIssueRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetPullRequestCommentRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetPullRequestRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetRepositoryRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Hook.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Hook/HookEventType.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Hook/PushOption.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/HostConfig.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/PrivateConfig.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/State.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/StateNote.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/WorkforceIdentityFederationConfig.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Issue.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Issue/State.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/IssueComment.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListBranchRulesRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListBranchRulesResponse.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListHooksRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListHooksResponse.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListInstancesRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListInstancesResponse.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssueCommentsRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssueCommentsResponse.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssuesRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssuesResponse.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestCommentsRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestCommentsResponse.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestFileDiffsRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestFileDiffsResponse.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestsRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestsResponse.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListRepositoriesRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListRepositoriesResponse.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/MergePullRequestRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/OpenIssueRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/OpenPullRequestRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequest/Branch.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequest/State.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Code.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Comment.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Position.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Review.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Review/ActionType.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Repository.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Repository/InitialConfig.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Repository/URIs.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ResolvePullRequestCommentsRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ResolvePullRequestCommentsResponse.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/TreeEntry.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/TreeEntry/ObjectType.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UnresolvePullRequestCommentsRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UnresolvePullRequestCommentsResponse.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateBranchRuleRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateHookRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateIssueCommentRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateIssueRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdatePullRequestCommentRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdatePullRequestRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateRepositoryRequest.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/batch_create_pull_request_comments.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/close_issue.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/close_pull_request.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_branch_rule.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_hook.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_instance.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_issue.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_issue_comment.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_pull_request.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_pull_request_comment.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_repository.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_branch_rule.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_hook.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_instance.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_issue.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_issue_comment.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_pull_request_comment.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_repository.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/fetch_blob.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/fetch_tree.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_branch_rule.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_hook.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_iam_policy.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_iam_policy_repo.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_instance.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_issue.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_issue_comment.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_location.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_pull_request.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_pull_request_comment.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_repository.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_branch_rules.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_hooks.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_instances.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_issue_comments.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_issues.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_locations.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_pull_request_comments.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_pull_request_file_diffs.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_pull_requests.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_repositories.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/merge_pull_request.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/open_issue.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/open_pull_request.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/resolve_pull_request_comments.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/set_iam_policy.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/set_iam_policy_repo.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/test_iam_permissions_repo.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/unresolve_pull_request_comments.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_branch_rule.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_hook.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_issue.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_issue_comment.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_pull_request.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_pull_request_comment.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_repository.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/src/V1/Client/SecureSourceManagerClient.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/SecureSourceManager/v1/src/V1/resources/secure_source_manager_client_config.json delete mode 100644 owl-bot-staging/SecureSourceManager/v1/src/V1/resources/secure_source_manager_descriptor_config.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/src/V1/resources/secure_source_manager_rest_client_config.php delete mode 100644 owl-bot-staging/SecureSourceManager/v1/tests/Unit/V1/Client/SecureSourceManagerClientTest.php diff --git a/SecureSourceManager/metadata/V1/SecureSourceManager.php b/SecureSourceManager/metadata/V1/SecureSourceManager.php index 2a184b448d33..54a81fb3bfcc 100644 --- a/SecureSourceManager/metadata/V1/SecureSourceManager.php +++ b/SecureSourceManager/metadata/V1/SecureSourceManager.php @@ -17,6 +17,7 @@ public static function initOnce() { \GPBMetadata\Google\Api\Annotations::initOnce(); \GPBMetadata\Google\Api\Client::initOnce(); \GPBMetadata\Google\Api\FieldBehavior::initOnce(); + \GPBMetadata\Google\Api\FieldInfo::initOnce(); \GPBMetadata\Google\Api\Resource::initOnce(); \GPBMetadata\Google\Iam\V1\IamPolicy::initOnce(); \GPBMetadata\Google\Iam\V1\Policy::initOnce(); @@ -25,7 +26,7 @@ public static function initOnce() { \GPBMetadata\Google\Protobuf\FieldMask::initOnce(); \GPBMetadata\Google\Protobuf\Timestamp::initOnce(); $pool->internalAddGeneratedFile( - "\x0A\xEF\xE9\x01\x0A?google/cloud/securesourcemanager/v1/secure_source_manager.proto\x12#google.cloud.securesourcemanager.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A\x1Egoogle/iam/v1/iam_policy.proto\x1A\x1Agoogle/iam/v1/policy.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x98\x0C\x0A\x08Instance\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x01\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12N\x0A\x06labels\x18\x04 \x03(\x0B29.google.cloud.securesourcemanager.v1.Instance.LabelsEntryB\x03\xE0A\x01\x12X\x0A\x0Eprivate_config\x18\x0D \x01(\x0B2;.google.cloud.securesourcemanager.v1.Instance.PrivateConfigB\x03\xE0A\x01\x12G\x0A\x05state\x18\x05 \x01(\x0E23.google.cloud.securesourcemanager.v1.Instance.StateB\x03\xE0A\x03\x12P\x0A\x0Astate_note\x18\x0A \x01(\x0E27.google.cloud.securesourcemanager.v1.Instance.StateNoteB\x03\xE0A\x03\x12:\x0A\x07kms_key\x18\x0B \x01(\x09B)\xE0A\x05\xFAA#\x0A!cloudkms.googleapis.com/CryptoKey\x12R\x0A\x0Bhost_config\x18\x09 \x01(\x0B28.google.cloud.securesourcemanager.v1.Instance.HostConfigB\x03\xE0A\x03\x12\x82\x01\x0A\$workforce_identity_federation_config\x18\x0E \x01(\x0B2O.google.cloud.securesourcemanager.v1.Instance.WorkforceIdentityFederationConfigB\x03\xE0A\x01\x1A^\x0A\x0AHostConfig\x12\x11\x0A\x04html\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x10\x0A\x03api\x18\x02 \x01(\x09B\x03\xE0A\x03\x12\x15\x0A\x08git_http\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x14\x0A\x07git_ssh\x18\x04 \x01(\x09B\x03\xE0A\x03\x1A\xB0\x02\x0A\x0DPrivateConfig\x12\x1A\x0A\x0Ais_private\x18\x01 \x01(\x08B\x06\xE0A\x05\xE0A\x02\x12;\x0A\x07ca_pool\x18\x02 \x01(\x09B*\xE0A\x05\xE0A\x01\xFAA!\x0A\x1Fprivateca.googleapis.com/CaPool\x12Q\x0A\x17http_service_attachment\x18\x03 \x01(\x09B0\xE0A\x03\xFAA*\x0A(compute.googleapis.com/ServiceAttachment\x12P\x0A\x16ssh_service_attachment\x18\x04 \x01(\x09B0\xE0A\x03\xFAA*\x0A(compute.googleapis.com/ServiceAttachment\x12!\x0A\x14psc_allowed_projects\x18\x06 \x03(\x09B\x03\xE0A\x01\x1A<\x0A!WorkforceIdentityFederationConfig\x12\x17\x0A\x07enabled\x18\x01 \x01(\x08B\x06\xE0A\x05\xE0A\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"_\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02\x12\x0C\x0A\x08DELETING\x10\x03\x12\x0A\x0A\x06PAUSED\x10\x04\x12\x0B\x0A\x07UNKNOWN\x10\x06\"_\x0A\x09StateNote\x12\x1A\x0A\x16STATE_NOTE_UNSPECIFIED\x10\x00\x12\x1B\x0A\x17PAUSED_CMEK_UNAVAILABLE\x10\x01\x12\x19\x0A\x11INSTANCE_RESUMING\x10\x02\x1A\x02\x08\x01:q\xEAAn\x0A+securesourcemanager.googleapis.com/Instance\x12.google.cloud.securesourcemanager.v1.PullRequestComment.ReviewB\x03\xE0A\x01H\x00\x12W\x0A\x07comment\x18\x05 \x01(\x0B2?.google.cloud.securesourcemanager.v1.PullRequestComment.CommentB\x03\xE0A\x01H\x00\x12Q\x0A\x04code\x18\x06 \x01(\x0B2<.google.cloud.securesourcemanager.v1.PullRequestComment.CodeB\x03\xE0A\x01H\x00\x1A\xFF\x01\x0A\x06Review\x12c\x0A\x0Baction_type\x18\x01 \x01(\x0E2I.google.cloud.securesourcemanager.v1.PullRequestComment.Review.ActionTypeB\x03\xE0A\x02\x12\x11\x0A\x04body\x18\x02 \x01(\x09B\x03\xE0A\x01\x12!\x0A\x14effective_commit_sha\x18\x04 \x01(\x09B\x03\xE0A\x03\"Z\x0A\x0AActionType\x12\x1B\x0A\x17ACTION_TYPE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07COMMENT\x10\x01\x12\x14\x0A\x10CHANGE_REQUESTED\x10\x02\x12\x0C\x0A\x08APPROVED\x10\x03\x1A\x1C\x0A\x07Comment\x12\x11\x0A\x04body\x18\x01 \x01(\x09B\x03\xE0A\x02\x1A\xE8\x01\x0A\x04Code\x12\x11\x0A\x04body\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x15\x0A\x05reply\x18\x02 \x01(\x09B\x06\xE0A\x01\xE0A\x04\x12W\x0A\x08position\x18\x03 \x01(\x0B2@.google.cloud.securesourcemanager.v1.PullRequestComment.PositionB\x03\xE0A\x01\x12#\x0A\x16effective_root_comment\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x15\x0A\x08resolved\x18\x05 \x01(\x08B\x03\xE0A\x03\x12!\x0A\x14effective_commit_sha\x18\x07 \x01(\x09B\x03\xE0A\x03\x1A0\x0A\x08Position\x12\x11\x0A\x04path\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x11\x0A\x04line\x18\x02 \x01(\x03B\x03\xE0A\x02:\xB8\x01\xEAA\xB4\x01\x0A5securesourcemanager.googleapis.com/PullRequestComment\x12{projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}/pullRequestComments/{comment}B\x10\x0A\x0Ecomment_detail\"\xA4\x01\x0A\x14ListInstancesRequest\x12C\x0A\x06parent\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x12+securesourcemanager.googleapis.com/Instance\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\x12\x10\x0A\x08order_by\x18\x05 \x01(\x09\"\x87\x01\x0A\x15ListInstancesResponse\x12@\x0A\x09instances\x18\x01 \x03(\x0B2-.google.cloud.securesourcemanager.v1.Instance\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"W\x0A\x12GetInstanceRequest\x12A\x0A\x04name\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+securesourcemanager.googleapis.com/Instance\"\xD5\x01\x0A\x15CreateInstanceRequest\x12C\x0A\x06parent\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x12+securesourcemanager.googleapis.com/Instance\x12\x18\x0A\x0Binstance_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12D\x0A\x08instance\x18\x03 \x01(\x0B2-.google.cloud.securesourcemanager.v1.InstanceB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"s\x0A\x15DeleteInstanceRequest\x12A\x0A\x04name\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+securesourcemanager.googleapis.com/Instance\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\"\x80\x02\x0A\x11OperationMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x121\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x06target\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04verb\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x1B\x0A\x0Estatus_message\x18\x05 \x01(\x09B\x03\xE0A\x03\x12#\x0A\x16requested_cancellation\x18\x06 \x01(\x08B\x03\xE0A\x03\x12\x18\x0A\x0Bapi_version\x18\x07 \x01(\x09B\x03\xE0A\x03\"\xE8\x01\x0A\x17ListRepositoriesRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x12-securesourcemanager.googleapis.com/Repository\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12E\x0A\x08instance\x18\x05 \x01(\x09B3\xE0A\x01\xFAA-\x0A+securesourcemanager.googleapis.com/Instance\"z\x0A\x18ListRepositoriesResponse\x12E\x0A\x0Crepositories\x18\x01 \x03(\x0B2/.google.cloud.securesourcemanager.v1.Repository\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"[\x0A\x14GetRepositoryRequest\x12C\x0A\x04name\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\"\xC6\x01\x0A\x17CreateRepositoryRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x12-securesourcemanager.googleapis.com/Repository\x12H\x0A\x0Arepository\x18\x02 \x01(\x0B2/.google.cloud.securesourcemanager.v1.RepositoryB\x03\xE0A\x02\x12\x1A\x0A\x0Drepository_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"\xB5\x01\x0A\x17UpdateRepositoryRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12H\x0A\x0Arepository\x18\x02 \x01(\x0B2/.google.cloud.securesourcemanager.v1.RepositoryB\x03\xE0A\x02\x12\x1A\x0A\x0Dvalidate_only\x18\x03 \x01(\x08B\x03\xE0A\x01\"z\x0A\x17DeleteRepositoryRequest\x12C\x0A\x04name\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\x12\x1A\x0A\x0Dallow_missing\x18\x02 \x01(\x08B\x03\xE0A\x01\"\x84\x01\x0A\x10ListHooksRequest\x12?\x0A\x06parent\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x12'securesourcemanager.googleapis.com/Hook\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"f\x0A\x11ListHooksResponse\x128\x0A\x05hooks\x18\x01 \x03(\x0B2).google.cloud.securesourcemanager.v1.Hook\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"O\x0A\x0EGetHookRequest\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x0A'securesourcemanager.googleapis.com/Hook\"\xAE\x01\x0A\x11CreateHookRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\x12<\x0A\x04hook\x18\x02 \x01(\x0B2).google.cloud.securesourcemanager.v1.HookB\x03\xE0A\x02\x12\x14\x0A\x07hook_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"\x87\x01\x0A\x11UpdateHookRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\x12<\x0A\x04hook\x18\x02 \x01(\x0B2).google.cloud.securesourcemanager.v1.HookB\x03\xE0A\x02\"R\x0A\x11DeleteHookRequest\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x0A'securesourcemanager.googleapis.com/Hook\"[\x0A\x14GetBranchRuleRequest\x12C\x0A\x04name\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/BranchRule\"\xC8\x01\x0A\x17CreateBranchRuleRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x12-securesourcemanager.googleapis.com/BranchRule\x12I\x0A\x0Bbranch_rule\x18\x02 \x01(\x0B2/.google.cloud.securesourcemanager.v1.BranchRuleB\x03\xE0A\x02\x12\x1B\x0A\x0Ebranch_rule_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"\x90\x01\x0A\x16ListBranchRulesRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x12-securesourcemanager.googleapis.com/BranchRule\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"z\x0A\x17DeleteBranchRuleRequest\x12C\x0A\x04name\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/BranchRule\x12\x1A\x0A\x0Dallow_missing\x18\x02 \x01(\x08B\x03\xE0A\x01\"\xB6\x01\x0A\x17UpdateBranchRuleRequest\x12I\x0A\x0Bbranch_rule\x18\x01 \x01(\x0B2/.google.cloud.securesourcemanager.v1.BranchRuleB\x03\xE0A\x02\x12\x1A\x0A\x0Dvalidate_only\x18\x02 \x01(\x08B\x03\xE0A\x01\x124\x0A\x0Bupdate_mask\x18\x03 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\"y\x0A\x17ListBranchRulesResponse\x12E\x0A\x0Cbranch_rules\x18\x01 \x03(\x0B2/.google.cloud.securesourcemanager.v1.BranchRule\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xAE\x01\x0A\x18CreatePullRequestRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\x12K\x0A\x0Cpull_request\x18\x02 \x01(\x0B20.google.cloud.securesourcemanager.v1.PullRequestB\x03\xE0A\x02\"]\x0A\x15GetPullRequestRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.securesourcemanager.googleapis.com/PullRequest\"\x91\x01\x0A\x17ListPullRequestsRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"|\x0A\x18ListPullRequestsResponse\x12G\x0A\x0Dpull_requests\x18\x01 \x03(\x0B20.google.cloud.securesourcemanager.v1.PullRequest\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x9D\x01\x0A\x18UpdatePullRequestRequest\x12K\x0A\x0Cpull_request\x18\x01 \x01(\x0B20.google.cloud.securesourcemanager.v1.PullRequestB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"_\x0A\x17MergePullRequestRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.securesourcemanager.googleapis.com/PullRequest\"^\x0A\x16OpenPullRequestRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.securesourcemanager.googleapis.com/PullRequest\"_\x0A\x17ClosePullRequestRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.securesourcemanager.googleapis.com/PullRequest\"\x98\x01\x0A\x1FListPullRequestFileDiffsRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.securesourcemanager.googleapis.com/PullRequest\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"~\x0A ListPullRequestFileDiffsResponse\x12A\x0A\x0Afile_diffs\x18\x01 \x03(\x0B2-.google.cloud.securesourcemanager.v1.FileDiff\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x9B\x01\x0A\x12CreateIssueRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\x12>\x0A\x05issue\x18\x02 \x01(\x0B2*.google.cloud.securesourcemanager.v1.IssueB\x03\xE0A\x02\"Q\x0A\x0FGetIssueRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(securesourcemanager.googleapis.com/Issue\"\x9B\x01\x0A\x11ListIssuesRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x12(securesourcemanager.googleapis.com/Issue\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\"i\x0A\x12ListIssuesResponse\x12:\x0A\x06issues\x18\x01 \x03(\x0B2*.google.cloud.securesourcemanager.v1.Issue\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x8A\x01\x0A\x12UpdateIssueRequest\x12>\x0A\x05issue\x18\x01 \x01(\x0B2*.google.cloud.securesourcemanager.v1.IssueB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"g\x0A\x12DeleteIssueRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(securesourcemanager.googleapis.com/Issue\x12\x11\x0A\x04etag\x18\x02 \x01(\x09B\x03\xE0A\x01\"f\x0A\x11CloseIssueRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(securesourcemanager.googleapis.com/Issue\x12\x11\x0A\x04etag\x18\x02 \x01(\x09B\x03\xE0A\x01\"e\x0A\x10OpenIssueRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(securesourcemanager.googleapis.com/Issue\x12\x11\x0A\x04etag\x18\x02 \x01(\x09B\x03\xE0A\x01\"\xEF\x01\x0A\x09TreeEntry\x12L\x0A\x04type\x18\x01 \x01(\x0E29.google.cloud.securesourcemanager.v1.TreeEntry.ObjectTypeB\x03\xE0A\x03\x12\x10\x0A\x03sha\x18\x02 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04path\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04mode\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04size\x18\x05 \x01(\x03B\x03\xE0A\x03\"I\x0A\x0AObjectType\x12\x1B\x0A\x17OBJECT_TYPE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04TREE\x10\x01\x12\x08\x0A\x04BLOB\x10\x02\x12\x0A\x0A\x06COMMIT\x10\x03\"\xB8\x01\x0A\x10FetchTreeRequest\x12I\x0A\x0Arepository\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\x12\x10\x0A\x03ref\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x16\x0A\x09recursive\x18\x03 \x01(\x08B\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x04 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x05 \x01(\x09B\x03\xE0A\x01\"r\x0A\x11FetchTreeResponse\x12D\x0A\x0Ctree_entries\x18\x01 \x03(\x0B2..google.cloud.securesourcemanager.v1.TreeEntry\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"o\x0A\x10FetchBlobRequest\x12I\x0A\x0Arepository\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\x12\x10\x0A\x03sha\x18\x02 \x01(\x09B\x03\xE0A\x02\"1\x0A\x11FetchBlobResponse\x12\x0B\x0A\x03sha\x18\x01 \x01(\x09\x12\x0F\x0A\x07content\x18\x02 \x01(\x09\"\xA0\x01\x0A\x1EListPullRequestCommentsRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125securesourcemanager.googleapis.com/PullRequestComment\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x92\x01\x0A\x1FListPullRequestCommentsResponse\x12V\x0A\x15pull_request_comments\x18\x01 \x03(\x0B27.google.cloud.securesourcemanager.v1.PullRequestComment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xCC\x01\x0A\x1FCreatePullRequestCommentRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125securesourcemanager.googleapis.com/PullRequestComment\x12Z\x0A\x14pull_request_comment\x18\x02 \x01(\x0B27.google.cloud.securesourcemanager.v1.PullRequestCommentB\x03\xE0A\x02\"\xD3\x01\x0A%BatchCreatePullRequestCommentsRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125securesourcemanager.googleapis.com/PullRequestComment\x12[\x0A\x08requests\x18\x02 \x03(\x0B2D.google.cloud.securesourcemanager.v1.CreatePullRequestCommentRequestB\x03\xE0A\x02\"\x80\x01\x0A&BatchCreatePullRequestCommentsResponse\x12V\x0A\x15pull_request_comments\x18\x01 \x03(\x0B27.google.cloud.securesourcemanager.v1.PullRequestComment\"\xB3\x01\x0A\x1FUpdatePullRequestCommentRequest\x12Z\x0A\x14pull_request_comment\x18\x01 \x01(\x0B27.google.cloud.securesourcemanager.v1.PullRequestCommentB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"n\x0A\x1FDeletePullRequestCommentRequest\x12K\x0A\x04name\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x0A5securesourcemanager.googleapis.com/PullRequestComment\"k\x0A\x1CGetPullRequestCommentRequest\x12K\x0A\x04name\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x0A5securesourcemanager.googleapis.com/PullRequestComment\"\xD8\x01\x0A!ResolvePullRequestCommentsRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125securesourcemanager.googleapis.com/PullRequestComment\x12L\x0A\x05names\x18\x02 \x03(\x09B=\xE0A\x02\xFAA7\x0A5securesourcemanager.googleapis.com/PullRequestComment\x12\x16\x0A\x09auto_fill\x18\x03 \x01(\x08B\x03\xE0A\x01\"|\x0A\"ResolvePullRequestCommentsResponse\x12V\x0A\x15pull_request_comments\x18\x01 \x03(\x0B27.google.cloud.securesourcemanager.v1.PullRequestComment\"\xDA\x01\x0A#UnresolvePullRequestCommentsRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125securesourcemanager.googleapis.com/PullRequestComment\x12L\x0A\x05names\x18\x02 \x03(\x09B=\xE0A\x02\xFAA7\x0A5securesourcemanager.googleapis.com/PullRequestComment\x12\x16\x0A\x09auto_fill\x18\x03 \x01(\x08B\x03\xE0A\x01\"~\x0A\$UnresolvePullRequestCommentsResponse\x12V\x0A\x15pull_request_comments\x18\x01 \x03(\x0B27.google.cloud.securesourcemanager.v1.PullRequestComment\"\xAC\x01\x0A\x19CreateIssueCommentRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(securesourcemanager.googleapis.com/Issue\x12M\x0A\x0Dissue_comment\x18\x02 \x01(\x0B21.google.cloud.securesourcemanager.v1.IssueCommentB\x03\xE0A\x02\"_\x0A\x16GetIssueCommentRequest\x12E\x0A\x04name\x18\x01 \x01(\x09B7\xE0A\x02\xFAA1\x0A/securesourcemanager.googleapis.com/IssueComment\"\x94\x01\x0A\x18ListIssueCommentsRequest\x12G\x0A\x06parent\x18\x01 \x01(\x09B7\xE0A\x02\xFAA1\x12/securesourcemanager.googleapis.com/IssueComment\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x7F\x0A\x19ListIssueCommentsResponse\x12I\x0A\x0Eissue_comments\x18\x01 \x03(\x0B21.google.cloud.securesourcemanager.v1.IssueComment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xA0\x01\x0A\x19UpdateIssueCommentRequest\x12M\x0A\x0Dissue_comment\x18\x01 \x01(\x0B21.google.cloud.securesourcemanager.v1.IssueCommentB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"b\x0A\x19DeleteIssueCommentRequest\x12E\x0A\x04name\x18\x01 \x01(\x09B7\xE0A\x02\xFAA1\x0A/securesourcemanager.googleapis.com/IssueComment2\xFEd\x0A\x13SecureSourceManager\x12\xC6\x01\x0A\x0DListInstances\x129.google.cloud.securesourcemanager.v1.ListInstancesRequest\x1A:.google.cloud.securesourcemanager.v1.ListInstancesResponse\">\xDAA\x06parent\x82\xD3\xE4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/instances\x12\xB3\x01\x0A\x0BGetInstance\x127.google.cloud.securesourcemanager.v1.GetInstanceRequest\x1A-.google.cloud.securesourcemanager.v1.Instance\"<\xDAA\x04name\x82\xD3\xE4\x93\x02/\x12-/v1/{name=projects/*/locations/*/instances/*}\x12\xEA\x01\x0A\x0ECreateInstance\x12:.google.cloud.securesourcemanager.v1.CreateInstanceRequest\x1A\x1D.google.longrunning.Operation\"}\xCAA\x1D\x0A\x08Instance\x12\x11OperationMetadata\xDAA\x1Bparent,instance,instance_id\x82\xD3\xE4\x93\x029\"-/v1/{parent=projects/*/locations/*}/instances:\x08instance\x12\xD6\x01\x0A\x0EDeleteInstance\x12:.google.cloud.securesourcemanager.v1.DeleteInstanceRequest\x1A\x1D.google.longrunning.Operation\"i\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02/*-/v1/{name=projects/*/locations/*/instances/*}\x12\xD2\x01\x0A\x10ListRepositories\x12<.google.cloud.securesourcemanager.v1.ListRepositoriesRequest\x1A=.google.cloud.securesourcemanager.v1.ListRepositoriesResponse\"A\xDAA\x06parent\x82\xD3\xE4\x93\x022\x120/v1/{parent=projects/*/locations/*}/repositories\x12\xBC\x01\x0A\x0DGetRepository\x129.google.cloud.securesourcemanager.v1.GetRepositoryRequest\x1A/.google.cloud.securesourcemanager.v1.Repository\"?\xDAA\x04name\x82\xD3\xE4\x93\x022\x120/v1/{name=projects/*/locations/*/repositories/*}\x12\xFA\x01\x0A\x10CreateRepository\x12<.google.cloud.securesourcemanager.v1.CreateRepositoryRequest\x1A\x1D.google.longrunning.Operation\"\x88\x01\xCAA\x1F\x0A\x0ARepository\x12\x11OperationMetadata\xDAA\x1Fparent,repository,repository_id\x82\xD3\xE4\x93\x02>\"0/v1/{parent=projects/*/locations/*}/repositories:\x0Arepository\x12\xFC\x01\x0A\x10UpdateRepository\x12<.google.cloud.securesourcemanager.v1.UpdateRepositoryRequest\x1A\x1D.google.longrunning.Operation\"\x8A\x01\xCAA\x1F\x0A\x0ARepository\x12\x11OperationMetadata\xDAA\x16repository,update_mask\x82\xD3\xE4\x93\x02I2;/v1/{repository.name=projects/*/locations/*/repositories/*}:\x0Arepository\x12\xDD\x01\x0A\x10DeleteRepository\x12<.google.cloud.securesourcemanager.v1.DeleteRepositoryRequest\x1A\x1D.google.longrunning.Operation\"l\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x022*0/v1/{name=projects/*/locations/*/repositories/*}\x12\xC5\x01\x0A\x09ListHooks\x125.google.cloud.securesourcemanager.v1.ListHooksRequest\x1A6.google.cloud.securesourcemanager.v1.ListHooksResponse\"I\xDAA\x06parent\x82\xD3\xE4\x93\x02:\x128/v1/{parent=projects/*/locations/*/repositories/*}/hooks\x12\xB2\x01\x0A\x07GetHook\x123.google.cloud.securesourcemanager.v1.GetHookRequest\x1A).google.cloud.securesourcemanager.v1.Hook\"G\xDAA\x04name\x82\xD3\xE4\x93\x02:\x128/v1/{name=projects/*/locations/*/repositories/*/hooks/*}\x12\xDD\x01\x0A\x0ACreateHook\x126.google.cloud.securesourcemanager.v1.CreateHookRequest\x1A\x1D.google.longrunning.Operation\"x\xCAA\x19\x0A\x04Hook\x12\x11OperationMetadata\xDAA\x13parent,hook,hook_id\x82\xD3\xE4\x93\x02@\"8/v1/{parent=projects/*/locations/*/repositories/*}/hooks:\x04hook\x12\xDF\x01\x0A\x0AUpdateHook\x126.google.cloud.securesourcemanager.v1.UpdateHookRequest\x1A\x1D.google.longrunning.Operation\"z\xCAA\x19\x0A\x04Hook\x12\x11OperationMetadata\xDAA\x10hook,update_mask\x82\xD3\xE4\x93\x02E2=/v1/{hook.name=projects/*/locations/*/repositories/*/hooks/*}:\x04hook\x12\xD9\x01\x0A\x0ADeleteHook\x126.google.cloud.securesourcemanager.v1.DeleteHookRequest\x1A\x1D.google.longrunning.Operation\"t\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02:*8/v1/{name=projects/*/locations/*/repositories/*/hooks/*}\x12\xA3\x01\x0A\x10GetIamPolicyRepo\x12\".google.iam.v1.GetIamPolicyRequest\x1A\x15.google.iam.v1.Policy\"T\xDAA\x08resource\x82\xD3\xE4\x93\x02C\x12A/v1/{resource=projects/*/locations/*/repositories/*}:getIamPolicy\x12\xA6\x01\x0A\x10SetIamPolicyRepo\x12\".google.iam.v1.SetIamPolicyRequest\x1A\x15.google.iam.v1.Policy\"W\xDAA\x08resource\x82\xD3\xE4\x93\x02F\"A/v1/{resource=projects/*/locations/*/repositories/*}:setIamPolicy:\x01*\x12\xCC\x01\x0A\x16TestIamPermissionsRepo\x12(.google.iam.v1.TestIamPermissionsRequest\x1A).google.iam.v1.TestIamPermissionsResponse\"]\xDAA\x08resource\x82\xD3\xE4\x93\x02L\"G/v1/{resource=projects/*/locations/*/repositories/*}:testIamPermissions:\x01*\x12\x8B\x02\x0A\x10CreateBranchRule\x12<.google.cloud.securesourcemanager.v1.CreateBranchRuleRequest\x1A\x1D.google.longrunning.Operation\"\x99\x01\xCAA\x1F\x0A\x0ABranchRule\x12\x11OperationMetadata\xDAA!parent,branch_rule,branch_rule_id\x82\xD3\xE4\x93\x02M\">/v1/{parent=projects/*/locations/*/repositories/*}/branchRules:\x0Bbranch_rule\x12\xDD\x01\x0A\x0FListBranchRules\x12;.google.cloud.securesourcemanager.v1.ListBranchRulesRequest\x1A<.google.cloud.securesourcemanager.v1.ListBranchRulesResponse\"O\xDAA\x06parent\x82\xD3\xE4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/repositories/*}/branchRules\x12\xCA\x01\x0A\x0DGetBranchRule\x129.google.cloud.securesourcemanager.v1.GetBranchRuleRequest\x1A/.google.cloud.securesourcemanager.v1.BranchRule\"M\xDAA\x04name\x82\xD3\xE4\x93\x02@\x12>/v1/{name=projects/*/locations/*/repositories/*/branchRules/*}\x12\x8D\x02\x0A\x10UpdateBranchRule\x12<.google.cloud.securesourcemanager.v1.UpdateBranchRuleRequest\x1A\x1D.google.longrunning.Operation\"\x9B\x01\xCAA\x1F\x0A\x0ABranchRule\x12\x11OperationMetadata\xDAA\x17branch_rule,update_mask\x82\xD3\xE4\x93\x02Y2J/v1/{branch_rule.name=projects/*/locations/*/repositories/*/branchRules/*}:\x0Bbranch_rule\x12\xEB\x01\x0A\x10DeleteBranchRule\x12<.google.cloud.securesourcemanager.v1.DeleteBranchRuleRequest\x1A\x1D.google.longrunning.Operation\"z\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02@*>/v1/{name=projects/*/locations/*/repositories/*/branchRules/*}\x12\xA6\x02\x0A\x11CreatePullRequest\x12=.google.cloud.securesourcemanager.v1.CreatePullRequestRequest\x1A\x1D.google.longrunning.Operation\"\xB2\x01\xCAAD\x0A/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xDAA\x13parent,pull_request\x82\xD3\xE4\x93\x02O\"?/v1/{parent=projects/*/locations/*/repositories/*}/pullRequests:\x0Cpull_request\x12\xCE\x01\x0A\x0EGetPullRequest\x12:.google.cloud.securesourcemanager.v1.GetPullRequestRequest\x1A0.google.cloud.securesourcemanager.v1.PullRequest\"N\xDAA\x04name\x82\xD3\xE4\x93\x02A\x12?/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}\x12\xE1\x01\x0A\x10ListPullRequests\x12<.google.cloud.securesourcemanager.v1.ListPullRequestsRequest\x1A=.google.cloud.securesourcemanager.v1.ListPullRequestsResponse\"P\xDAA\x06parent\x82\xD3\xE4\x93\x02A\x12?/v1/{parent=projects/*/locations/*/repositories/*}/pullRequests\x12\xB8\x02\x0A\x11UpdatePullRequest\x12=.google.cloud.securesourcemanager.v1.UpdatePullRequestRequest\x1A\x1D.google.longrunning.Operation\"\xC4\x01\xCAAD\x0A/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xDAA\x18pull_request,update_mask\x82\xD3\xE4\x93\x02\\2L/v1/{pull_request.name=projects/*/locations/*/repositories/*/pullRequests/*}:\x0Cpull_request\x12\x90\x02\x0A\x10MergePullRequest\x12<.google.cloud.securesourcemanager.v1.MergePullRequestRequest\x1A\x1D.google.longrunning.Operation\"\x9E\x01\xCAAD\x0A/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02J\"E/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:merge:\x01*\x12\x8D\x02\x0A\x0FOpenPullRequest\x12;.google.cloud.securesourcemanager.v1.OpenPullRequestRequest\x1A\x1D.google.longrunning.Operation\"\x9D\x01\xCAAD\x0A/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02I\"D/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:open:\x01*\x12\x90\x02\x0A\x10ClosePullRequest\x12<.google.cloud.securesourcemanager.v1.ClosePullRequestRequest\x1A\x1D.google.longrunning.Operation\"\x9E\x01\xCAAD\x0A/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02J\"E/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:close:\x01*\x12\x85\x02\x0A\x18ListPullRequestFileDiffs\x12D.google.cloud.securesourcemanager.v1.ListPullRequestFileDiffsRequest\x1AE.google.cloud.securesourcemanager.v1.ListPullRequestFileDiffsResponse\"\\\xDAA\x04name\x82\xD3\xE4\x93\x02O\x12M/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:listFileDiffs\x12\xC4\x01\x0A\x09FetchTree\x125.google.cloud.securesourcemanager.v1.FetchTreeRequest\x1A6.google.cloud.securesourcemanager.v1.FetchTreeResponse\"H\x82\xD3\xE4\x93\x02B\x12@/v1/{repository=projects/*/locations/*/repositories/*}:fetchTree\x12\xC4\x01\x0A\x09FetchBlob\x125.google.cloud.securesourcemanager.v1.FetchBlobRequest\x1A6.google.cloud.securesourcemanager.v1.FetchBlobResponse\"H\x82\xD3\xE4\x93\x02B\x12@/v1/{repository=projects/*/locations/*/repositories/*}:fetchBlob\x12\x80\x02\x0A\x0BCreateIssue\x127.google.cloud.securesourcemanager.v1.CreateIssueRequest\x1A\x1D.google.longrunning.Operation\"\x98\x01\xCAA>\x0A)google.cloud.securesourcemanager.v1.Issue\x12\x11OperationMetadata\xDAA\x0Cparent,issue\x82\xD3\xE4\x93\x02B\"9/v1/{parent=projects/*/locations/*/repositories/*}/issues:\x05issue\x12\xB6\x01\x0A\x08GetIssue\x124.google.cloud.securesourcemanager.v1.GetIssueRequest\x1A*.google.cloud.securesourcemanager.v1.Issue\"H\xDAA\x04name\x82\xD3\xE4\x93\x02;\x129/v1/{name=projects/*/locations/*/repositories/*/issues/*}\x12\xC9\x01\x0A\x0AListIssues\x126.google.cloud.securesourcemanager.v1.ListIssuesRequest\x1A7.google.cloud.securesourcemanager.v1.ListIssuesResponse\"J\xDAA\x06parent\x82\xD3\xE4\x93\x02;\x129/v1/{parent=projects/*/locations/*/repositories/*}/issues\x12\x8B\x02\x0A\x0BUpdateIssue\x127.google.cloud.securesourcemanager.v1.UpdateIssueRequest\x1A\x1D.google.longrunning.Operation\"\xA3\x01\xCAA>\x0A)google.cloud.securesourcemanager.v1.Issue\x12\x11OperationMetadata\xDAA\x11issue,update_mask\x82\xD3\xE4\x93\x02H2?/v1/{issue.name=projects/*/locations/*/repositories/*/issues/*}:\x05issue\x12\xDC\x01\x0A\x0BDeleteIssue\x127.google.cloud.securesourcemanager.v1.DeleteIssueRequest\x1A\x1D.google.longrunning.Operation\"u\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02;*9/v1/{name=projects/*/locations/*/repositories/*/issues/*}\x12\xF5\x01\x0A\x09OpenIssue\x125.google.cloud.securesourcemanager.v1.OpenIssueRequest\x1A\x1D.google.longrunning.Operation\"\x91\x01\xCAA>\x0A)google.cloud.securesourcemanager.v1.Issue\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02C\">/v1/{name=projects/*/locations/*/repositories/*/issues/*}:open:\x01*\x12\xF8\x01\x0A\x0ACloseIssue\x126.google.cloud.securesourcemanager.v1.CloseIssueRequest\x1A\x1D.google.longrunning.Operation\"\x92\x01\xCAA>\x0A)google.cloud.securesourcemanager.v1.Issue\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02D\"?/v1/{name=projects/*/locations/*/repositories/*/issues/*}:close:\x01*\x12\xF9\x01\x0A\x15GetPullRequestComment\x12A.google.cloud.securesourcemanager.v1.GetPullRequestCommentRequest\x1A7.google.cloud.securesourcemanager.v1.PullRequestComment\"d\xDAA\x04name\x82\xD3\xE4\x93\x02W\x12U/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*/pullRequestComments/*}\x12\x8C\x02\x0A\x17ListPullRequestComments\x12C.google.cloud.securesourcemanager.v1.ListPullRequestCommentsRequest\x1AD.google.cloud.securesourcemanager.v1.ListPullRequestCommentsResponse\"f\xDAA\x06parent\x82\xD3\xE4\x93\x02W\x12U/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments\x12\xE1\x02\x0A\x18CreatePullRequestComment\x12D.google.cloud.securesourcemanager.v1.CreatePullRequestCommentRequest\x1A\x1D.google.longrunning.Operation\"\xDF\x01\xCAAK\x0A6google.cloud.securesourcemanager.v1.PullRequestComment\x12\x11OperationMetadata\xDAA\x1Bparent,pull_request_comment\x82\xD3\xE4\x93\x02m\"U/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:\x14pull_request_comment\x12\xFC\x02\x0A\x18UpdatePullRequestComment\x12D.google.cloud.securesourcemanager.v1.UpdatePullRequestCommentRequest\x1A\x1D.google.longrunning.Operation\"\xFA\x01\xCAAK\x0A6google.cloud.securesourcemanager.v1.PullRequestComment\x12\x11OperationMetadata\xDAA pull_request_comment,update_mask\x82\xD3\xE4\x93\x02\x82\x012j/v1/{pull_request_comment.name=projects/*/locations/*/repositories/*/pullRequests/*/pullRequestComments/*}:\x14pull_request_comment\x12\x93\x02\x0A\x18DeletePullRequestComment\x12D.google.cloud.securesourcemanager.v1.DeletePullRequestCommentRequest\x1A\x1D.google.longrunning.Operation\"\x91\x01\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02W*U/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*/pullRequestComments/*}\x12\xCA\x02\x0A\x1EBatchCreatePullRequestComments\x12J.google.cloud.securesourcemanager.v1.BatchCreatePullRequestCommentsRequest\x1A\x1D.google.longrunning.Operation\"\xBC\x01\xCAA;\x0A&BatchCreatePullRequestCommentsResponse\x12\x11OperationMetadata\xDAA\x0Fparent,requests\x82\xD3\xE4\x93\x02f\"a/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:batchCreate:\x01*\x12\xB7\x02\x0A\x1AResolvePullRequestComments\x12F.google.cloud.securesourcemanager.v1.ResolvePullRequestCommentsRequest\x1A\x1D.google.longrunning.Operation\"\xB1\x01\xCAA7\x0A\"ResolvePullRequestCommentsResponse\x12\x11OperationMetadata\xDAA\x0Cparent,names\x82\xD3\xE4\x93\x02b\"]/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:resolve:\x01*\x12\xBF\x02\x0A\x1CUnresolvePullRequestComments\x12H.google.cloud.securesourcemanager.v1.UnresolvePullRequestCommentsRequest\x1A\x1D.google.longrunning.Operation\"\xB5\x01\xCAA9\x0A\$UnresolvePullRequestCommentsResponse\x12\x11OperationMetadata\xDAA\x0Cparent,names\x82\xD3\xE4\x93\x02d\"_/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:unresolve:\x01*\x12\xB5\x02\x0A\x12CreateIssueComment\x12>.google.cloud.securesourcemanager.v1.CreateIssueCommentRequest\x1A\x1D.google.longrunning.Operation\"\xBF\x01\xCAAE\x0A0google.cloud.securesourcemanager.v1.IssueComment\x12\x11OperationMetadata\xDAA\x14parent,issue_comment\x82\xD3\xE4\x93\x02Z\"I/v1/{parent=projects/*/locations/*/repositories/*/issues/*}/issueComments:\x0Dissue_comment\x12\xDB\x01\x0A\x0FGetIssueComment\x12;.google.cloud.securesourcemanager.v1.GetIssueCommentRequest\x1A1.google.cloud.securesourcemanager.v1.IssueComment\"X\xDAA\x04name\x82\xD3\xE4\x93\x02K\x12I/v1/{name=projects/*/locations/*/repositories/*/issues/*/issueComments/*}\x12\xEE\x01\x0A\x11ListIssueComments\x12=.google.cloud.securesourcemanager.v1.ListIssueCommentsRequest\x1A>.google.cloud.securesourcemanager.v1.ListIssueCommentsResponse\"Z\xDAA\x06parent\x82\xD3\xE4\x93\x02K\x12I/v1/{parent=projects/*/locations/*/repositories/*/issues/*}/issueComments\x12\xC8\x02\x0A\x12UpdateIssueComment\x12>.google.cloud.securesourcemanager.v1.UpdateIssueCommentRequest\x1A\x1D.google.longrunning.Operation\"\xD2\x01\xCAAE\x0A0google.cloud.securesourcemanager.v1.IssueComment\x12\x11OperationMetadata\xDAA\x19issue_comment,update_mask\x82\xD3\xE4\x93\x02h2W/v1/{issue_comment.name=projects/*/locations/*/repositories/*/issues/*/issueComments/*}:\x0Dissue_comment\x12\xFB\x01\x0A\x12DeleteIssueComment\x12>.google.cloud.securesourcemanager.v1.DeleteIssueCommentRequest\x1A\x1D.google.longrunning.Operation\"\x85\x01\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02K*I/v1/{name=projects/*/locations/*/repositories/*/issues/*/issueComments/*}\x1AV\xCAA\"securesourcemanager.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xE9\x04\x0A'com.google.cloud.securesourcemanager.v1B\x18SecureSourceManagerProtoP\x01ZYcloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb;securesourcemanagerpb\xAA\x02#Google.Cloud.SecureSourceManager.V1\xCA\x02#Google\\Cloud\\SecureSourceManager\\V1\xEA\x02&Google::Cloud::SecureSourceManager::V1\xEAAx\x0A!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xEAA\\\x0A\x1Fprivateca.googleapis.com/CaPool\x129projects/{project}/locations/{location}/caPools/{ca_pool}\xEAAw\x0A(compute.googleapis.com/ServiceAttachment\x12Kprojects/{project}/regions/{region}/serviceAttachments/{service_attachment}b\x06proto3" + "\x0A\xE4\xEC\x01\x0A?google/cloud/securesourcemanager/v1/secure_source_manager.proto\x12#google.cloud.securesourcemanager.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x1Bgoogle/api/field_info.proto\x1A\x19google/api/resource.proto\x1A\x1Egoogle/iam/v1/iam_policy.proto\x1A\x1Agoogle/iam/v1/policy.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xED\x0D\x0A\x08Instance\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12N\x0A\x06labels\x18\x04 \x03(\x0B29.google.cloud.securesourcemanager.v1.Instance.LabelsEntryB\x03\xE0A\x01\x12X\x0A\x0Eprivate_config\x18\x0D \x01(\x0B2;.google.cloud.securesourcemanager.v1.Instance.PrivateConfigB\x03\xE0A\x01\x12G\x0A\x05state\x18\x05 \x01(\x0E23.google.cloud.securesourcemanager.v1.Instance.StateB\x03\xE0A\x03\x12P\x0A\x0Astate_note\x18\x0A \x01(\x0E27.google.cloud.securesourcemanager.v1.Instance.StateNoteB\x03\xE0A\x03\x12:\x0A\x07kms_key\x18\x0B \x01(\x09B)\xE0A\x05\xFAA#\x0A!cloudkms.googleapis.com/CryptoKey\x12R\x0A\x0Bhost_config\x18\x09 \x01(\x0B28.google.cloud.securesourcemanager.v1.Instance.HostConfigB\x03\xE0A\x03\x12\x82\x01\x0A\$workforce_identity_federation_config\x18\x0E \x01(\x0B2O.google.cloud.securesourcemanager.v1.Instance.WorkforceIdentityFederationConfigB\x03\xE0A\x01\x1A^\x0A\x0AHostConfig\x12\x11\x0A\x04html\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x10\x0A\x03api\x18\x02 \x01(\x09B\x03\xE0A\x03\x12\x15\x0A\x08git_http\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x14\x0A\x07git_ssh\x18\x04 \x01(\x09B\x03\xE0A\x03\x1A\x85\x04\x0A\x0DPrivateConfig\x12\x1A\x0A\x0Ais_private\x18\x01 \x01(\x08B\x06\xE0A\x05\xE0A\x02\x12;\x0A\x07ca_pool\x18\x02 \x01(\x09B*\xE0A\x05\xE0A\x01\xFAA!\x0A\x1Fprivateca.googleapis.com/CaPool\x12Q\x0A\x17http_service_attachment\x18\x03 \x01(\x09B0\xE0A\x03\xFAA*\x0A(compute.googleapis.com/ServiceAttachment\x12P\x0A\x16ssh_service_attachment\x18\x04 \x01(\x09B0\xE0A\x03\xFAA*\x0A(compute.googleapis.com/ServiceAttachment\x12!\x0A\x14psc_allowed_projects\x18\x06 \x03(\x09B\x03\xE0A\x01\x12m\x0A\x12custom_host_config\x18\x07 \x01(\x0B2L.google.cloud.securesourcemanager.v1.Instance.PrivateConfig.CustomHostConfigB\x03\xE0A\x01\x1Ad\x0A\x10CustomHostConfig\x12\x11\x0A\x04html\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x10\x0A\x03api\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\x14\x0A\x07git_ssh\x18\x03 \x01(\x09B\x03\xE0A\x02\x12\x15\x0A\x08git_http\x18\x04 \x01(\x09B\x03\xE0A\x02\x1A<\x0A!WorkforceIdentityFederationConfig\x12\x17\x0A\x07enabled\x18\x01 \x01(\x08B\x06\xE0A\x05\xE0A\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"_\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02\x12\x0C\x0A\x08DELETING\x10\x03\x12\x0A\x0A\x06PAUSED\x10\x04\x12\x0B\x0A\x07UNKNOWN\x10\x06\"_\x0A\x09StateNote\x12\x1A\x0A\x16STATE_NOTE_UNSPECIFIED\x10\x00\x12\x1B\x0A\x17PAUSED_CMEK_UNAVAILABLE\x10\x01\x12\x19\x0A\x11INSTANCE_RESUMING\x10\x02\x1A\x02\x08\x01:q\xEAAn\x0A+securesourcemanager.googleapis.com/Instance\x12.google.cloud.securesourcemanager.v1.PullRequestComment.ReviewB\x03\xE0A\x01H\x00\x12W\x0A\x07comment\x18\x05 \x01(\x0B2?.google.cloud.securesourcemanager.v1.PullRequestComment.CommentB\x03\xE0A\x01H\x00\x12Q\x0A\x04code\x18\x06 \x01(\x0B2<.google.cloud.securesourcemanager.v1.PullRequestComment.CodeB\x03\xE0A\x01H\x00\x1A\xFF\x01\x0A\x06Review\x12c\x0A\x0Baction_type\x18\x01 \x01(\x0E2I.google.cloud.securesourcemanager.v1.PullRequestComment.Review.ActionTypeB\x03\xE0A\x02\x12\x11\x0A\x04body\x18\x02 \x01(\x09B\x03\xE0A\x01\x12!\x0A\x14effective_commit_sha\x18\x04 \x01(\x09B\x03\xE0A\x03\"Z\x0A\x0AActionType\x12\x1B\x0A\x17ACTION_TYPE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07COMMENT\x10\x01\x12\x14\x0A\x10CHANGE_REQUESTED\x10\x02\x12\x0C\x0A\x08APPROVED\x10\x03\x1A\x1C\x0A\x07Comment\x12\x11\x0A\x04body\x18\x01 \x01(\x09B\x03\xE0A\x02\x1A\xE8\x01\x0A\x04Code\x12\x11\x0A\x04body\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x15\x0A\x05reply\x18\x02 \x01(\x09B\x06\xE0A\x01\xE0A\x04\x12W\x0A\x08position\x18\x03 \x01(\x0B2@.google.cloud.securesourcemanager.v1.PullRequestComment.PositionB\x03\xE0A\x01\x12#\x0A\x16effective_root_comment\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x15\x0A\x08resolved\x18\x05 \x01(\x08B\x03\xE0A\x03\x12!\x0A\x14effective_commit_sha\x18\x07 \x01(\x09B\x03\xE0A\x03\x1A0\x0A\x08Position\x12\x11\x0A\x04path\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x11\x0A\x04line\x18\x02 \x01(\x03B\x03\xE0A\x02:\xB8\x01\xEAA\xB4\x01\x0A5securesourcemanager.googleapis.com/PullRequestComment\x12{projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}/pullRequestComments/{comment}B\x10\x0A\x0Ecomment_detail\"\xB8\x01\x0A\x14ListInstancesRequest\x12C\x0A\x06parent\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x12+securesourcemanager.googleapis.com/Instance\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\"\x87\x01\x0A\x15ListInstancesResponse\x12@\x0A\x09instances\x18\x01 \x03(\x0B2-.google.cloud.securesourcemanager.v1.Instance\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"W\x0A\x12GetInstanceRequest\x12A\x0A\x04name\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+securesourcemanager.googleapis.com/Instance\"\xDD\x01\x0A\x15CreateInstanceRequest\x12C\x0A\x06parent\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x12+securesourcemanager.googleapis.com/Instance\x12\x18\x0A\x0Binstance_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12D\x0A\x08instance\x18\x03 \x01(\x0B2-.google.cloud.securesourcemanager.v1.InstanceB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\x8F\x01\x0A\x15DeleteInstanceRequest\x12A\x0A\x04name\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+securesourcemanager.googleapis.com/Instance\x12\x1F\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\x12\x12\x0A\x05force\x18\x03 \x01(\x08B\x03\xE0A\x01\"\x80\x02\x0A\x11OperationMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x121\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x06target\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04verb\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x1B\x0A\x0Estatus_message\x18\x05 \x01(\x09B\x03\xE0A\x03\x12#\x0A\x16requested_cancellation\x18\x06 \x01(\x08B\x03\xE0A\x03\x12\x18\x0A\x0Bapi_version\x18\x07 \x01(\x09B\x03\xE0A\x03\"\xED\x01\x0A\x17ListRepositoriesRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x12-securesourcemanager.googleapis.com/Repository\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12E\x0A\x08instance\x18\x05 \x01(\x09B3\xE0A\x01\xFAA-\x0A+securesourcemanager.googleapis.com/Instance\"z\x0A\x18ListRepositoriesResponse\x12E\x0A\x0Crepositories\x18\x01 \x03(\x0B2/.google.cloud.securesourcemanager.v1.Repository\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"[\x0A\x14GetRepositoryRequest\x12C\x0A\x04name\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\"\xC6\x01\x0A\x17CreateRepositoryRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x12-securesourcemanager.googleapis.com/Repository\x12H\x0A\x0Arepository\x18\x02 \x01(\x0B2/.google.cloud.securesourcemanager.v1.RepositoryB\x03\xE0A\x02\x12\x1A\x0A\x0Drepository_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"\xB5\x01\x0A\x17UpdateRepositoryRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12H\x0A\x0Arepository\x18\x02 \x01(\x0B2/.google.cloud.securesourcemanager.v1.RepositoryB\x03\xE0A\x02\x12\x1A\x0A\x0Dvalidate_only\x18\x03 \x01(\x08B\x03\xE0A\x01\"z\x0A\x17DeleteRepositoryRequest\x12C\x0A\x04name\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\x12\x1A\x0A\x0Dallow_missing\x18\x02 \x01(\x08B\x03\xE0A\x01\"\x84\x01\x0A\x10ListHooksRequest\x12?\x0A\x06parent\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x12'securesourcemanager.googleapis.com/Hook\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"f\x0A\x11ListHooksResponse\x128\x0A\x05hooks\x18\x01 \x03(\x0B2).google.cloud.securesourcemanager.v1.Hook\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"O\x0A\x0EGetHookRequest\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x0A'securesourcemanager.googleapis.com/Hook\"\xAE\x01\x0A\x11CreateHookRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\x12<\x0A\x04hook\x18\x02 \x01(\x0B2).google.cloud.securesourcemanager.v1.HookB\x03\xE0A\x02\x12\x14\x0A\x07hook_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"\x87\x01\x0A\x11UpdateHookRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12<\x0A\x04hook\x18\x02 \x01(\x0B2).google.cloud.securesourcemanager.v1.HookB\x03\xE0A\x02\"R\x0A\x11DeleteHookRequest\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x0A'securesourcemanager.googleapis.com/Hook\"[\x0A\x14GetBranchRuleRequest\x12C\x0A\x04name\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/BranchRule\"\xC8\x01\x0A\x17CreateBranchRuleRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x12-securesourcemanager.googleapis.com/BranchRule\x12I\x0A\x0Bbranch_rule\x18\x02 \x01(\x0B2/.google.cloud.securesourcemanager.v1.BranchRuleB\x03\xE0A\x02\x12\x1B\x0A\x0Ebranch_rule_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"\x90\x01\x0A\x16ListBranchRulesRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x12-securesourcemanager.googleapis.com/BranchRule\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"z\x0A\x17DeleteBranchRuleRequest\x12C\x0A\x04name\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/BranchRule\x12\x1A\x0A\x0Dallow_missing\x18\x02 \x01(\x08B\x03\xE0A\x01\"\xB6\x01\x0A\x17UpdateBranchRuleRequest\x12I\x0A\x0Bbranch_rule\x18\x01 \x01(\x0B2/.google.cloud.securesourcemanager.v1.BranchRuleB\x03\xE0A\x02\x12\x1A\x0A\x0Dvalidate_only\x18\x02 \x01(\x08B\x03\xE0A\x01\x124\x0A\x0Bupdate_mask\x18\x03 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"y\x0A\x17ListBranchRulesResponse\x12E\x0A\x0Cbranch_rules\x18\x01 \x03(\x0B2/.google.cloud.securesourcemanager.v1.BranchRule\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xAE\x01\x0A\x18CreatePullRequestRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\x12K\x0A\x0Cpull_request\x18\x02 \x01(\x0B20.google.cloud.securesourcemanager.v1.PullRequestB\x03\xE0A\x02\"]\x0A\x15GetPullRequestRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.securesourcemanager.googleapis.com/PullRequest\"\x91\x01\x0A\x17ListPullRequestsRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"|\x0A\x18ListPullRequestsResponse\x12G\x0A\x0Dpull_requests\x18\x01 \x03(\x0B20.google.cloud.securesourcemanager.v1.PullRequest\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x9D\x01\x0A\x18UpdatePullRequestRequest\x12K\x0A\x0Cpull_request\x18\x01 \x01(\x0B20.google.cloud.securesourcemanager.v1.PullRequestB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"_\x0A\x17MergePullRequestRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.securesourcemanager.googleapis.com/PullRequest\"^\x0A\x16OpenPullRequestRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.securesourcemanager.googleapis.com/PullRequest\"_\x0A\x17ClosePullRequestRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.securesourcemanager.googleapis.com/PullRequest\"\x98\x01\x0A\x1FListPullRequestFileDiffsRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.securesourcemanager.googleapis.com/PullRequest\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"~\x0A ListPullRequestFileDiffsResponse\x12A\x0A\x0Afile_diffs\x18\x01 \x03(\x0B2-.google.cloud.securesourcemanager.v1.FileDiff\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x9B\x01\x0A\x12CreateIssueRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\x12>\x0A\x05issue\x18\x02 \x01(\x0B2*.google.cloud.securesourcemanager.v1.IssueB\x03\xE0A\x02\"Q\x0A\x0FGetIssueRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(securesourcemanager.googleapis.com/Issue\"\x9B\x01\x0A\x11ListIssuesRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x12(securesourcemanager.googleapis.com/Issue\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\"i\x0A\x12ListIssuesResponse\x12:\x0A\x06issues\x18\x01 \x03(\x0B2*.google.cloud.securesourcemanager.v1.Issue\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x8A\x01\x0A\x12UpdateIssueRequest\x12>\x0A\x05issue\x18\x01 \x01(\x0B2*.google.cloud.securesourcemanager.v1.IssueB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"g\x0A\x12DeleteIssueRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(securesourcemanager.googleapis.com/Issue\x12\x11\x0A\x04etag\x18\x02 \x01(\x09B\x03\xE0A\x01\"f\x0A\x11CloseIssueRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(securesourcemanager.googleapis.com/Issue\x12\x11\x0A\x04etag\x18\x02 \x01(\x09B\x03\xE0A\x01\"e\x0A\x10OpenIssueRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(securesourcemanager.googleapis.com/Issue\x12\x11\x0A\x04etag\x18\x02 \x01(\x09B\x03\xE0A\x01\"\xEF\x01\x0A\x09TreeEntry\x12L\x0A\x04type\x18\x01 \x01(\x0E29.google.cloud.securesourcemanager.v1.TreeEntry.ObjectTypeB\x03\xE0A\x03\x12\x10\x0A\x03sha\x18\x02 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04path\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04mode\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04size\x18\x05 \x01(\x03B\x03\xE0A\x03\"I\x0A\x0AObjectType\x12\x1B\x0A\x17OBJECT_TYPE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04TREE\x10\x01\x12\x08\x0A\x04BLOB\x10\x02\x12\x0A\x0A\x06COMMIT\x10\x03\"\xB8\x01\x0A\x10FetchTreeRequest\x12I\x0A\x0Arepository\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\x12\x10\x0A\x03ref\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x16\x0A\x09recursive\x18\x03 \x01(\x08B\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x04 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x05 \x01(\x09B\x03\xE0A\x01\"r\x0A\x11FetchTreeResponse\x12D\x0A\x0Ctree_entries\x18\x01 \x03(\x0B2..google.cloud.securesourcemanager.v1.TreeEntry\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"o\x0A\x10FetchBlobRequest\x12I\x0A\x0Arepository\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\x12\x10\x0A\x03sha\x18\x02 \x01(\x09B\x03\xE0A\x02\"1\x0A\x11FetchBlobResponse\x12\x0B\x0A\x03sha\x18\x01 \x01(\x09\x12\x0F\x0A\x07content\x18\x02 \x01(\x09\"\xA0\x01\x0A\x1EListPullRequestCommentsRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125securesourcemanager.googleapis.com/PullRequestComment\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x92\x01\x0A\x1FListPullRequestCommentsResponse\x12V\x0A\x15pull_request_comments\x18\x01 \x03(\x0B27.google.cloud.securesourcemanager.v1.PullRequestComment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xCC\x01\x0A\x1FCreatePullRequestCommentRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125securesourcemanager.googleapis.com/PullRequestComment\x12Z\x0A\x14pull_request_comment\x18\x02 \x01(\x0B27.google.cloud.securesourcemanager.v1.PullRequestCommentB\x03\xE0A\x02\"\xD3\x01\x0A%BatchCreatePullRequestCommentsRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125securesourcemanager.googleapis.com/PullRequestComment\x12[\x0A\x08requests\x18\x02 \x03(\x0B2D.google.cloud.securesourcemanager.v1.CreatePullRequestCommentRequestB\x03\xE0A\x02\"\x80\x01\x0A&BatchCreatePullRequestCommentsResponse\x12V\x0A\x15pull_request_comments\x18\x01 \x03(\x0B27.google.cloud.securesourcemanager.v1.PullRequestComment\"\xB3\x01\x0A\x1FUpdatePullRequestCommentRequest\x12Z\x0A\x14pull_request_comment\x18\x01 \x01(\x0B27.google.cloud.securesourcemanager.v1.PullRequestCommentB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"n\x0A\x1FDeletePullRequestCommentRequest\x12K\x0A\x04name\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x0A5securesourcemanager.googleapis.com/PullRequestComment\"k\x0A\x1CGetPullRequestCommentRequest\x12K\x0A\x04name\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x0A5securesourcemanager.googleapis.com/PullRequestComment\"\xD8\x01\x0A!ResolvePullRequestCommentsRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125securesourcemanager.googleapis.com/PullRequestComment\x12L\x0A\x05names\x18\x02 \x03(\x09B=\xE0A\x02\xFAA7\x0A5securesourcemanager.googleapis.com/PullRequestComment\x12\x16\x0A\x09auto_fill\x18\x03 \x01(\x08B\x03\xE0A\x01\"|\x0A\"ResolvePullRequestCommentsResponse\x12V\x0A\x15pull_request_comments\x18\x01 \x03(\x0B27.google.cloud.securesourcemanager.v1.PullRequestComment\"\xDA\x01\x0A#UnresolvePullRequestCommentsRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125securesourcemanager.googleapis.com/PullRequestComment\x12L\x0A\x05names\x18\x02 \x03(\x09B=\xE0A\x02\xFAA7\x0A5securesourcemanager.googleapis.com/PullRequestComment\x12\x16\x0A\x09auto_fill\x18\x03 \x01(\x08B\x03\xE0A\x01\"~\x0A\$UnresolvePullRequestCommentsResponse\x12V\x0A\x15pull_request_comments\x18\x01 \x03(\x0B27.google.cloud.securesourcemanager.v1.PullRequestComment\"\xAC\x01\x0A\x19CreateIssueCommentRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(securesourcemanager.googleapis.com/Issue\x12M\x0A\x0Dissue_comment\x18\x02 \x01(\x0B21.google.cloud.securesourcemanager.v1.IssueCommentB\x03\xE0A\x02\"_\x0A\x16GetIssueCommentRequest\x12E\x0A\x04name\x18\x01 \x01(\x09B7\xE0A\x02\xFAA1\x0A/securesourcemanager.googleapis.com/IssueComment\"\x94\x01\x0A\x18ListIssueCommentsRequest\x12G\x0A\x06parent\x18\x01 \x01(\x09B7\xE0A\x02\xFAA1\x12/securesourcemanager.googleapis.com/IssueComment\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x7F\x0A\x19ListIssueCommentsResponse\x12I\x0A\x0Eissue_comments\x18\x01 \x03(\x0B21.google.cloud.securesourcemanager.v1.IssueComment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xA0\x01\x0A\x19UpdateIssueCommentRequest\x12M\x0A\x0Dissue_comment\x18\x01 \x01(\x0B21.google.cloud.securesourcemanager.v1.IssueCommentB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"b\x0A\x19DeleteIssueCommentRequest\x12E\x0A\x04name\x18\x01 \x01(\x09B7\xE0A\x02\xFAA1\x0A/securesourcemanager.googleapis.com/IssueComment2\xFEd\x0A\x13SecureSourceManager\x12\xC6\x01\x0A\x0DListInstances\x129.google.cloud.securesourcemanager.v1.ListInstancesRequest\x1A:.google.cloud.securesourcemanager.v1.ListInstancesResponse\">\xDAA\x06parent\x82\xD3\xE4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/instances\x12\xB3\x01\x0A\x0BGetInstance\x127.google.cloud.securesourcemanager.v1.GetInstanceRequest\x1A-.google.cloud.securesourcemanager.v1.Instance\"<\xDAA\x04name\x82\xD3\xE4\x93\x02/\x12-/v1/{name=projects/*/locations/*/instances/*}\x12\xEA\x01\x0A\x0ECreateInstance\x12:.google.cloud.securesourcemanager.v1.CreateInstanceRequest\x1A\x1D.google.longrunning.Operation\"}\xCAA\x1D\x0A\x08Instance\x12\x11OperationMetadata\xDAA\x1Bparent,instance,instance_id\x82\xD3\xE4\x93\x029\"-/v1/{parent=projects/*/locations/*}/instances:\x08instance\x12\xD6\x01\x0A\x0EDeleteInstance\x12:.google.cloud.securesourcemanager.v1.DeleteInstanceRequest\x1A\x1D.google.longrunning.Operation\"i\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02/*-/v1/{name=projects/*/locations/*/instances/*}\x12\xD2\x01\x0A\x10ListRepositories\x12<.google.cloud.securesourcemanager.v1.ListRepositoriesRequest\x1A=.google.cloud.securesourcemanager.v1.ListRepositoriesResponse\"A\xDAA\x06parent\x82\xD3\xE4\x93\x022\x120/v1/{parent=projects/*/locations/*}/repositories\x12\xBC\x01\x0A\x0DGetRepository\x129.google.cloud.securesourcemanager.v1.GetRepositoryRequest\x1A/.google.cloud.securesourcemanager.v1.Repository\"?\xDAA\x04name\x82\xD3\xE4\x93\x022\x120/v1/{name=projects/*/locations/*/repositories/*}\x12\xFA\x01\x0A\x10CreateRepository\x12<.google.cloud.securesourcemanager.v1.CreateRepositoryRequest\x1A\x1D.google.longrunning.Operation\"\x88\x01\xCAA\x1F\x0A\x0ARepository\x12\x11OperationMetadata\xDAA\x1Fparent,repository,repository_id\x82\xD3\xE4\x93\x02>\"0/v1/{parent=projects/*/locations/*}/repositories:\x0Arepository\x12\xFC\x01\x0A\x10UpdateRepository\x12<.google.cloud.securesourcemanager.v1.UpdateRepositoryRequest\x1A\x1D.google.longrunning.Operation\"\x8A\x01\xCAA\x1F\x0A\x0ARepository\x12\x11OperationMetadata\xDAA\x16repository,update_mask\x82\xD3\xE4\x93\x02I2;/v1/{repository.name=projects/*/locations/*/repositories/*}:\x0Arepository\x12\xDD\x01\x0A\x10DeleteRepository\x12<.google.cloud.securesourcemanager.v1.DeleteRepositoryRequest\x1A\x1D.google.longrunning.Operation\"l\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x022*0/v1/{name=projects/*/locations/*/repositories/*}\x12\xC5\x01\x0A\x09ListHooks\x125.google.cloud.securesourcemanager.v1.ListHooksRequest\x1A6.google.cloud.securesourcemanager.v1.ListHooksResponse\"I\xDAA\x06parent\x82\xD3\xE4\x93\x02:\x128/v1/{parent=projects/*/locations/*/repositories/*}/hooks\x12\xB2\x01\x0A\x07GetHook\x123.google.cloud.securesourcemanager.v1.GetHookRequest\x1A).google.cloud.securesourcemanager.v1.Hook\"G\xDAA\x04name\x82\xD3\xE4\x93\x02:\x128/v1/{name=projects/*/locations/*/repositories/*/hooks/*}\x12\xDD\x01\x0A\x0ACreateHook\x126.google.cloud.securesourcemanager.v1.CreateHookRequest\x1A\x1D.google.longrunning.Operation\"x\xCAA\x19\x0A\x04Hook\x12\x11OperationMetadata\xDAA\x13parent,hook,hook_id\x82\xD3\xE4\x93\x02@\"8/v1/{parent=projects/*/locations/*/repositories/*}/hooks:\x04hook\x12\xDF\x01\x0A\x0AUpdateHook\x126.google.cloud.securesourcemanager.v1.UpdateHookRequest\x1A\x1D.google.longrunning.Operation\"z\xCAA\x19\x0A\x04Hook\x12\x11OperationMetadata\xDAA\x10hook,update_mask\x82\xD3\xE4\x93\x02E2=/v1/{hook.name=projects/*/locations/*/repositories/*/hooks/*}:\x04hook\x12\xD9\x01\x0A\x0ADeleteHook\x126.google.cloud.securesourcemanager.v1.DeleteHookRequest\x1A\x1D.google.longrunning.Operation\"t\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02:*8/v1/{name=projects/*/locations/*/repositories/*/hooks/*}\x12\xA3\x01\x0A\x10GetIamPolicyRepo\x12\".google.iam.v1.GetIamPolicyRequest\x1A\x15.google.iam.v1.Policy\"T\xDAA\x08resource\x82\xD3\xE4\x93\x02C\x12A/v1/{resource=projects/*/locations/*/repositories/*}:getIamPolicy\x12\xA6\x01\x0A\x10SetIamPolicyRepo\x12\".google.iam.v1.SetIamPolicyRequest\x1A\x15.google.iam.v1.Policy\"W\xDAA\x08resource\x82\xD3\xE4\x93\x02F\"A/v1/{resource=projects/*/locations/*/repositories/*}:setIamPolicy:\x01*\x12\xCC\x01\x0A\x16TestIamPermissionsRepo\x12(.google.iam.v1.TestIamPermissionsRequest\x1A).google.iam.v1.TestIamPermissionsResponse\"]\xDAA\x08resource\x82\xD3\xE4\x93\x02L\"G/v1/{resource=projects/*/locations/*/repositories/*}:testIamPermissions:\x01*\x12\x8B\x02\x0A\x10CreateBranchRule\x12<.google.cloud.securesourcemanager.v1.CreateBranchRuleRequest\x1A\x1D.google.longrunning.Operation\"\x99\x01\xCAA\x1F\x0A\x0ABranchRule\x12\x11OperationMetadata\xDAA!parent,branch_rule,branch_rule_id\x82\xD3\xE4\x93\x02M\">/v1/{parent=projects/*/locations/*/repositories/*}/branchRules:\x0Bbranch_rule\x12\xDD\x01\x0A\x0FListBranchRules\x12;.google.cloud.securesourcemanager.v1.ListBranchRulesRequest\x1A<.google.cloud.securesourcemanager.v1.ListBranchRulesResponse\"O\xDAA\x06parent\x82\xD3\xE4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/repositories/*}/branchRules\x12\xCA\x01\x0A\x0DGetBranchRule\x129.google.cloud.securesourcemanager.v1.GetBranchRuleRequest\x1A/.google.cloud.securesourcemanager.v1.BranchRule\"M\xDAA\x04name\x82\xD3\xE4\x93\x02@\x12>/v1/{name=projects/*/locations/*/repositories/*/branchRules/*}\x12\x8D\x02\x0A\x10UpdateBranchRule\x12<.google.cloud.securesourcemanager.v1.UpdateBranchRuleRequest\x1A\x1D.google.longrunning.Operation\"\x9B\x01\xCAA\x1F\x0A\x0ABranchRule\x12\x11OperationMetadata\xDAA\x17branch_rule,update_mask\x82\xD3\xE4\x93\x02Y2J/v1/{branch_rule.name=projects/*/locations/*/repositories/*/branchRules/*}:\x0Bbranch_rule\x12\xEB\x01\x0A\x10DeleteBranchRule\x12<.google.cloud.securesourcemanager.v1.DeleteBranchRuleRequest\x1A\x1D.google.longrunning.Operation\"z\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02@*>/v1/{name=projects/*/locations/*/repositories/*/branchRules/*}\x12\xA6\x02\x0A\x11CreatePullRequest\x12=.google.cloud.securesourcemanager.v1.CreatePullRequestRequest\x1A\x1D.google.longrunning.Operation\"\xB2\x01\xCAAD\x0A/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xDAA\x13parent,pull_request\x82\xD3\xE4\x93\x02O\"?/v1/{parent=projects/*/locations/*/repositories/*}/pullRequests:\x0Cpull_request\x12\xCE\x01\x0A\x0EGetPullRequest\x12:.google.cloud.securesourcemanager.v1.GetPullRequestRequest\x1A0.google.cloud.securesourcemanager.v1.PullRequest\"N\xDAA\x04name\x82\xD3\xE4\x93\x02A\x12?/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}\x12\xE1\x01\x0A\x10ListPullRequests\x12<.google.cloud.securesourcemanager.v1.ListPullRequestsRequest\x1A=.google.cloud.securesourcemanager.v1.ListPullRequestsResponse\"P\xDAA\x06parent\x82\xD3\xE4\x93\x02A\x12?/v1/{parent=projects/*/locations/*/repositories/*}/pullRequests\x12\xB8\x02\x0A\x11UpdatePullRequest\x12=.google.cloud.securesourcemanager.v1.UpdatePullRequestRequest\x1A\x1D.google.longrunning.Operation\"\xC4\x01\xCAAD\x0A/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xDAA\x18pull_request,update_mask\x82\xD3\xE4\x93\x02\\2L/v1/{pull_request.name=projects/*/locations/*/repositories/*/pullRequests/*}:\x0Cpull_request\x12\x90\x02\x0A\x10MergePullRequest\x12<.google.cloud.securesourcemanager.v1.MergePullRequestRequest\x1A\x1D.google.longrunning.Operation\"\x9E\x01\xCAAD\x0A/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02J\"E/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:merge:\x01*\x12\x8D\x02\x0A\x0FOpenPullRequest\x12;.google.cloud.securesourcemanager.v1.OpenPullRequestRequest\x1A\x1D.google.longrunning.Operation\"\x9D\x01\xCAAD\x0A/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02I\"D/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:open:\x01*\x12\x90\x02\x0A\x10ClosePullRequest\x12<.google.cloud.securesourcemanager.v1.ClosePullRequestRequest\x1A\x1D.google.longrunning.Operation\"\x9E\x01\xCAAD\x0A/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02J\"E/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:close:\x01*\x12\x85\x02\x0A\x18ListPullRequestFileDiffs\x12D.google.cloud.securesourcemanager.v1.ListPullRequestFileDiffsRequest\x1AE.google.cloud.securesourcemanager.v1.ListPullRequestFileDiffsResponse\"\\\xDAA\x04name\x82\xD3\xE4\x93\x02O\x12M/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:listFileDiffs\x12\xC4\x01\x0A\x09FetchTree\x125.google.cloud.securesourcemanager.v1.FetchTreeRequest\x1A6.google.cloud.securesourcemanager.v1.FetchTreeResponse\"H\x82\xD3\xE4\x93\x02B\x12@/v1/{repository=projects/*/locations/*/repositories/*}:fetchTree\x12\xC4\x01\x0A\x09FetchBlob\x125.google.cloud.securesourcemanager.v1.FetchBlobRequest\x1A6.google.cloud.securesourcemanager.v1.FetchBlobResponse\"H\x82\xD3\xE4\x93\x02B\x12@/v1/{repository=projects/*/locations/*/repositories/*}:fetchBlob\x12\x80\x02\x0A\x0BCreateIssue\x127.google.cloud.securesourcemanager.v1.CreateIssueRequest\x1A\x1D.google.longrunning.Operation\"\x98\x01\xCAA>\x0A)google.cloud.securesourcemanager.v1.Issue\x12\x11OperationMetadata\xDAA\x0Cparent,issue\x82\xD3\xE4\x93\x02B\"9/v1/{parent=projects/*/locations/*/repositories/*}/issues:\x05issue\x12\xB6\x01\x0A\x08GetIssue\x124.google.cloud.securesourcemanager.v1.GetIssueRequest\x1A*.google.cloud.securesourcemanager.v1.Issue\"H\xDAA\x04name\x82\xD3\xE4\x93\x02;\x129/v1/{name=projects/*/locations/*/repositories/*/issues/*}\x12\xC9\x01\x0A\x0AListIssues\x126.google.cloud.securesourcemanager.v1.ListIssuesRequest\x1A7.google.cloud.securesourcemanager.v1.ListIssuesResponse\"J\xDAA\x06parent\x82\xD3\xE4\x93\x02;\x129/v1/{parent=projects/*/locations/*/repositories/*}/issues\x12\x8B\x02\x0A\x0BUpdateIssue\x127.google.cloud.securesourcemanager.v1.UpdateIssueRequest\x1A\x1D.google.longrunning.Operation\"\xA3\x01\xCAA>\x0A)google.cloud.securesourcemanager.v1.Issue\x12\x11OperationMetadata\xDAA\x11issue,update_mask\x82\xD3\xE4\x93\x02H2?/v1/{issue.name=projects/*/locations/*/repositories/*/issues/*}:\x05issue\x12\xDC\x01\x0A\x0BDeleteIssue\x127.google.cloud.securesourcemanager.v1.DeleteIssueRequest\x1A\x1D.google.longrunning.Operation\"u\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02;*9/v1/{name=projects/*/locations/*/repositories/*/issues/*}\x12\xF5\x01\x0A\x09OpenIssue\x125.google.cloud.securesourcemanager.v1.OpenIssueRequest\x1A\x1D.google.longrunning.Operation\"\x91\x01\xCAA>\x0A)google.cloud.securesourcemanager.v1.Issue\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02C\">/v1/{name=projects/*/locations/*/repositories/*/issues/*}:open:\x01*\x12\xF8\x01\x0A\x0ACloseIssue\x126.google.cloud.securesourcemanager.v1.CloseIssueRequest\x1A\x1D.google.longrunning.Operation\"\x92\x01\xCAA>\x0A)google.cloud.securesourcemanager.v1.Issue\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02D\"?/v1/{name=projects/*/locations/*/repositories/*/issues/*}:close:\x01*\x12\xF9\x01\x0A\x15GetPullRequestComment\x12A.google.cloud.securesourcemanager.v1.GetPullRequestCommentRequest\x1A7.google.cloud.securesourcemanager.v1.PullRequestComment\"d\xDAA\x04name\x82\xD3\xE4\x93\x02W\x12U/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*/pullRequestComments/*}\x12\x8C\x02\x0A\x17ListPullRequestComments\x12C.google.cloud.securesourcemanager.v1.ListPullRequestCommentsRequest\x1AD.google.cloud.securesourcemanager.v1.ListPullRequestCommentsResponse\"f\xDAA\x06parent\x82\xD3\xE4\x93\x02W\x12U/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments\x12\xE1\x02\x0A\x18CreatePullRequestComment\x12D.google.cloud.securesourcemanager.v1.CreatePullRequestCommentRequest\x1A\x1D.google.longrunning.Operation\"\xDF\x01\xCAAK\x0A6google.cloud.securesourcemanager.v1.PullRequestComment\x12\x11OperationMetadata\xDAA\x1Bparent,pull_request_comment\x82\xD3\xE4\x93\x02m\"U/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:\x14pull_request_comment\x12\xFC\x02\x0A\x18UpdatePullRequestComment\x12D.google.cloud.securesourcemanager.v1.UpdatePullRequestCommentRequest\x1A\x1D.google.longrunning.Operation\"\xFA\x01\xCAAK\x0A6google.cloud.securesourcemanager.v1.PullRequestComment\x12\x11OperationMetadata\xDAA pull_request_comment,update_mask\x82\xD3\xE4\x93\x02\x82\x012j/v1/{pull_request_comment.name=projects/*/locations/*/repositories/*/pullRequests/*/pullRequestComments/*}:\x14pull_request_comment\x12\x93\x02\x0A\x18DeletePullRequestComment\x12D.google.cloud.securesourcemanager.v1.DeletePullRequestCommentRequest\x1A\x1D.google.longrunning.Operation\"\x91\x01\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02W*U/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*/pullRequestComments/*}\x12\xCA\x02\x0A\x1EBatchCreatePullRequestComments\x12J.google.cloud.securesourcemanager.v1.BatchCreatePullRequestCommentsRequest\x1A\x1D.google.longrunning.Operation\"\xBC\x01\xCAA;\x0A&BatchCreatePullRequestCommentsResponse\x12\x11OperationMetadata\xDAA\x0Fparent,requests\x82\xD3\xE4\x93\x02f\"a/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:batchCreate:\x01*\x12\xB7\x02\x0A\x1AResolvePullRequestComments\x12F.google.cloud.securesourcemanager.v1.ResolvePullRequestCommentsRequest\x1A\x1D.google.longrunning.Operation\"\xB1\x01\xCAA7\x0A\"ResolvePullRequestCommentsResponse\x12\x11OperationMetadata\xDAA\x0Cparent,names\x82\xD3\xE4\x93\x02b\"]/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:resolve:\x01*\x12\xBF\x02\x0A\x1CUnresolvePullRequestComments\x12H.google.cloud.securesourcemanager.v1.UnresolvePullRequestCommentsRequest\x1A\x1D.google.longrunning.Operation\"\xB5\x01\xCAA9\x0A\$UnresolvePullRequestCommentsResponse\x12\x11OperationMetadata\xDAA\x0Cparent,names\x82\xD3\xE4\x93\x02d\"_/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:unresolve:\x01*\x12\xB5\x02\x0A\x12CreateIssueComment\x12>.google.cloud.securesourcemanager.v1.CreateIssueCommentRequest\x1A\x1D.google.longrunning.Operation\"\xBF\x01\xCAAE\x0A0google.cloud.securesourcemanager.v1.IssueComment\x12\x11OperationMetadata\xDAA\x14parent,issue_comment\x82\xD3\xE4\x93\x02Z\"I/v1/{parent=projects/*/locations/*/repositories/*/issues/*}/issueComments:\x0Dissue_comment\x12\xDB\x01\x0A\x0FGetIssueComment\x12;.google.cloud.securesourcemanager.v1.GetIssueCommentRequest\x1A1.google.cloud.securesourcemanager.v1.IssueComment\"X\xDAA\x04name\x82\xD3\xE4\x93\x02K\x12I/v1/{name=projects/*/locations/*/repositories/*/issues/*/issueComments/*}\x12\xEE\x01\x0A\x11ListIssueComments\x12=.google.cloud.securesourcemanager.v1.ListIssueCommentsRequest\x1A>.google.cloud.securesourcemanager.v1.ListIssueCommentsResponse\"Z\xDAA\x06parent\x82\xD3\xE4\x93\x02K\x12I/v1/{parent=projects/*/locations/*/repositories/*/issues/*}/issueComments\x12\xC8\x02\x0A\x12UpdateIssueComment\x12>.google.cloud.securesourcemanager.v1.UpdateIssueCommentRequest\x1A\x1D.google.longrunning.Operation\"\xD2\x01\xCAAE\x0A0google.cloud.securesourcemanager.v1.IssueComment\x12\x11OperationMetadata\xDAA\x19issue_comment,update_mask\x82\xD3\xE4\x93\x02h2W/v1/{issue_comment.name=projects/*/locations/*/repositories/*/issues/*/issueComments/*}:\x0Dissue_comment\x12\xFB\x01\x0A\x12DeleteIssueComment\x12>.google.cloud.securesourcemanager.v1.DeleteIssueCommentRequest\x1A\x1D.google.longrunning.Operation\"\x85\x01\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02K*I/v1/{name=projects/*/locations/*/repositories/*/issues/*/issueComments/*}\x1AV\xCAA\"securesourcemanager.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xE9\x04\x0A'com.google.cloud.securesourcemanager.v1B\x18SecureSourceManagerProtoP\x01ZYcloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb;securesourcemanagerpb\xAA\x02#Google.Cloud.SecureSourceManager.V1\xCA\x02#Google\\Cloud\\SecureSourceManager\\V1\xEA\x02&Google::Cloud::SecureSourceManager::V1\xEAAx\x0A!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xEAA\\\x0A\x1Fprivateca.googleapis.com/CaPool\x129projects/{project}/locations/{location}/caPools/{ca_pool}\xEAAw\x0A(compute.googleapis.com/ServiceAttachment\x12Kprojects/{project}/regions/{region}/serviceAttachments/{service_attachment}b\x06proto3" , true); static::$is_initialized = true; diff --git a/SecureSourceManager/samples/V1/SecureSourceManagerClient/batch_create_pull_request_comments.php b/SecureSourceManager/samples/V1/SecureSourceManagerClient/batch_create_pull_request_comments.php index 08877727c889..2423f81f570a 100644 --- a/SecureSourceManager/samples/V1/SecureSourceManagerClient/batch_create_pull_request_comments.php +++ b/SecureSourceManager/samples/V1/SecureSourceManagerClient/batch_create_pull_request_comments.php @@ -36,7 +36,7 @@ * Batch creates pull request comments. This function is used to create * multiple PullRequestComments for code review. There needs to be exactly one * PullRequestComment of type Review, and at most 100 PullRequestComments of - * type Code per request. The Postition of the code comments must be unique + * type Code per request. The Position of the code comments must be unique * within the request. * * @param string $formattedParent The pull request in which to create the pull request comments. diff --git a/SecureSourceManager/samples/V1/SecureSourceManagerClient/list_locations.php b/SecureSourceManager/samples/V1/SecureSourceManagerClient/list_locations.php index 86f137d7475e..ec43bf7e5711 100644 --- a/SecureSourceManager/samples/V1/SecureSourceManagerClient/list_locations.php +++ b/SecureSourceManager/samples/V1/SecureSourceManagerClient/list_locations.php @@ -31,6 +31,22 @@ /** * Lists information about the supported locations for this service. + +This method lists locations based on the resource scope provided in +the [ListLocationsRequest.name] field: + +* **Global locations**: If `name` is empty, the method lists the +public locations available to all projects. * **Project-specific +locations**: If `name` follows the format +`projects/{project}`, the method lists locations visible to that +specific project. This includes public, private, or other +project-specific locations enabled for the project. + +For gRPC and client library implementations, the resource name is +passed as the `name` field. For direct service calls, the resource +name is +incorporated into the request path based on the specific service +implementation and version. * * This sample has been automatically generated and should be regarded as a code * template only. It will require modifications to work: diff --git a/SecureSourceManager/samples/V1/SecureSourceManagerClient/update_branch_rule.php b/SecureSourceManager/samples/V1/SecureSourceManagerClient/update_branch_rule.php index 6baafcb1d6b8..8b31bbe3cdbc 100644 --- a/SecureSourceManager/samples/V1/SecureSourceManagerClient/update_branch_rule.php +++ b/SecureSourceManager/samples/V1/SecureSourceManagerClient/update_branch_rule.php @@ -28,7 +28,6 @@ use Google\Cloud\SecureSourceManager\V1\BranchRule; use Google\Cloud\SecureSourceManager\V1\Client\SecureSourceManagerClient; use Google\Cloud\SecureSourceManager\V1\UpdateBranchRuleRequest; -use Google\Protobuf\FieldMask; use Google\Rpc\Status; /** @@ -47,10 +46,8 @@ function update_branch_rule_sample(): void // Prepare the request message. $branchRule = new BranchRule(); - $updateMask = new FieldMask(); $request = (new UpdateBranchRuleRequest()) - ->setBranchRule($branchRule) - ->setUpdateMask($updateMask); + ->setBranchRule($branchRule); // Call the API and handle any network failures. try { diff --git a/SecureSourceManager/samples/V1/SecureSourceManagerClient/update_hook.php b/SecureSourceManager/samples/V1/SecureSourceManagerClient/update_hook.php index 3b6f85c4e0a5..645dddce2a62 100644 --- a/SecureSourceManager/samples/V1/SecureSourceManagerClient/update_hook.php +++ b/SecureSourceManager/samples/V1/SecureSourceManagerClient/update_hook.php @@ -28,7 +28,6 @@ use Google\Cloud\SecureSourceManager\V1\Client\SecureSourceManagerClient; use Google\Cloud\SecureSourceManager\V1\Hook; use Google\Cloud\SecureSourceManager\V1\UpdateHookRequest; -use Google\Protobuf\FieldMask; use Google\Rpc\Status; /** @@ -42,11 +41,9 @@ function update_hook_sample(string $hookTargetUri): void $secureSourceManagerClient = new SecureSourceManagerClient(); // Prepare the request message. - $updateMask = new FieldMask(); $hook = (new Hook()) ->setTargetUri($hookTargetUri); $request = (new UpdateHookRequest()) - ->setUpdateMask($updateMask) ->setHook($hook); // Call the API and handle any network failures. diff --git a/SecureSourceManager/src/V1/BranchRule.php b/SecureSourceManager/src/V1/BranchRule.php index 67e422c6e7ff..a78b823d4027 100644 --- a/SecureSourceManager/src/V1/BranchRule.php +++ b/SecureSourceManager/src/V1/BranchRule.php @@ -17,17 +17,17 @@ class BranchRule extends \Google\Protobuf\Internal\Message { /** - * Optional. A unique identifier for a BranchRule. The name should be of the + * Identifier. A unique identifier for a BranchRule. The name should be of the * format: * `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}` * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; */ protected $name = ''; /** * Output only. Unique identifier of the repository. * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { */ protected $uid = ''; /** @@ -93,6 +93,13 @@ class BranchRule extends \Google\Protobuf\Internal\Message * Generated from protobuf field int32 minimum_approvals_count = 11 [(.google.api.field_behavior) = OPTIONAL]; */ protected $minimum_approvals_count = 0; + /** + * Optional. Determines if code owners must approve before merging to the + * branch. + * + * Generated from protobuf field bool require_code_owner_approval = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $require_code_owner_approval = false; /** * Optional. Determines if require comments resolved before merging to the * branch. @@ -128,7 +135,7 @@ class BranchRule extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Optional. A unique identifier for a BranchRule. The name should be of the + * Identifier. A unique identifier for a BranchRule. The name should be of the * format: * `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}` * @type string $uid @@ -160,6 +167,9 @@ class BranchRule extends \Google\Protobuf\Internal\Message * @type int $minimum_approvals_count * Optional. The minimum number of approvals required for the branch rule to * be matched. + * @type bool $require_code_owner_approval + * Optional. Determines if code owners must approve before merging to the + * branch. * @type bool $require_comments_resolved * Optional. Determines if require comments resolved before merging to the * branch. @@ -179,11 +189,11 @@ public function __construct($data = NULL) { } /** - * Optional. A unique identifier for a BranchRule. The name should be of the + * Identifier. A unique identifier for a BranchRule. The name should be of the * format: * `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}` * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @return string */ public function getName() @@ -192,11 +202,11 @@ public function getName() } /** - * Optional. A unique identifier for a BranchRule. The name should be of the + * Identifier. A unique identifier for a BranchRule. The name should be of the * format: * `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}` * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @param string $var * @return $this */ @@ -211,7 +221,7 @@ public function setName($var) /** * Output only. Unique identifier of the repository. * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { * @return string */ public function getUid() @@ -222,7 +232,7 @@ public function getUid() /** * Output only. Unique identifier of the repository. * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { * @param string $var * @return $this */ @@ -506,6 +516,34 @@ public function setMinimumApprovalsCount($var) return $this; } + /** + * Optional. Determines if code owners must approve before merging to the + * branch. + * + * Generated from protobuf field bool require_code_owner_approval = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getRequireCodeOwnerApproval() + { + return $this->require_code_owner_approval; + } + + /** + * Optional. Determines if code owners must approve before merging to the + * branch. + * + * Generated from protobuf field bool require_code_owner_approval = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setRequireCodeOwnerApproval($var) + { + GPBUtil::checkBool($var); + $this->require_code_owner_approval = $var; + + return $this; + } + /** * Optional. Determines if require comments resolved before merging to the * branch. diff --git a/SecureSourceManager/src/V1/Client/SecureSourceManagerClient.php b/SecureSourceManager/src/V1/Client/SecureSourceManagerClient.php index 04dbcf07647d..912579ad287e 100644 --- a/SecureSourceManager/src/V1/Client/SecureSourceManagerClient.php +++ b/SecureSourceManager/src/V1/Client/SecureSourceManagerClient.php @@ -663,7 +663,7 @@ public function __call($method, $args) * Batch creates pull request comments. This function is used to create * multiple PullRequestComments for code review. There needs to be exactly one * PullRequestComment of type Review, and at most 100 PullRequestComments of - * type Code per request. The Postition of the code comments must be unique + * type Code per request. The Position of the code comments must be unique * within the request. * * The async variant is @@ -2188,6 +2188,22 @@ public function getLocation(GetLocationRequest $request, array $callOptions = [] /** * Lists information about the supported locations for this service. + + This method lists locations based on the resource scope provided in + the [ListLocationsRequest.name] field: + + * **Global locations**: If `name` is empty, the method lists the + public locations available to all projects. * **Project-specific + locations**: If `name` follows the format + `projects/{project}`, the method lists locations visible to that + specific project. This includes public, private, or other + project-specific locations enabled for the project. + + For gRPC and client library implementations, the resource name is + passed as the `name` field. For direct service calls, the resource + name is + incorporated into the request path based on the specific service + implementation and version. * * The async variant is {@see SecureSourceManagerClient::listLocationsAsync()} . * diff --git a/SecureSourceManager/src/V1/CreateInstanceRequest.php b/SecureSourceManager/src/V1/CreateInstanceRequest.php index 4490c2377008..a0094b4d8bdf 100644 --- a/SecureSourceManager/src/V1/CreateInstanceRequest.php +++ b/SecureSourceManager/src/V1/CreateInstanceRequest.php @@ -46,7 +46,7 @@ class CreateInstanceRequest extends \Google\Protobuf\Internal\Message * The request ID must be a valid UUID with the exception that zero UUID is * not supported (00000000-0000-0000-0000-000000000000). * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { */ protected $request_id = ''; @@ -200,7 +200,7 @@ public function setInstance($var) * The request ID must be a valid UUID with the exception that zero UUID is * not supported (00000000-0000-0000-0000-000000000000). * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { * @return string */ public function getRequestId() @@ -221,7 +221,7 @@ public function getRequestId() * The request ID must be a valid UUID with the exception that zero UUID is * not supported (00000000-0000-0000-0000-000000000000). * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { * @param string $var * @return $this */ diff --git a/SecureSourceManager/src/V1/DeleteInstanceRequest.php b/SecureSourceManager/src/V1/DeleteInstanceRequest.php index 4010fd75cce1..b4cd224f4619 100644 --- a/SecureSourceManager/src/V1/DeleteInstanceRequest.php +++ b/SecureSourceManager/src/V1/DeleteInstanceRequest.php @@ -34,9 +34,15 @@ class DeleteInstanceRequest extends \Google\Protobuf\Internal\Message * The request ID must be a valid UUID with the exception that zero UUID is * not supported (00000000-0000-0000-0000-000000000000). * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { */ protected $request_id = ''; + /** + * Optional. If set to true, will force the deletion of the instance. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $force = false; /** * @param string $name Required. Name of the resource. Please see @@ -72,6 +78,8 @@ public static function build(string $name): self * clients from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $force + * Optional. If set to true, will force the deletion of the instance. * } */ public function __construct($data = NULL) { @@ -118,7 +126,7 @@ public function setName($var) * The request ID must be a valid UUID with the exception that zero UUID is * not supported (00000000-0000-0000-0000-000000000000). * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { * @return string */ public function getRequestId() @@ -139,7 +147,7 @@ public function getRequestId() * The request ID must be a valid UUID with the exception that zero UUID is * not supported (00000000-0000-0000-0000-000000000000). * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { * @param string $var * @return $this */ @@ -151,5 +159,31 @@ public function setRequestId($var) return $this; } + /** + * Optional. If set to true, will force the deletion of the instance. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Optional. If set to true, will force the deletion of the instance. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + } diff --git a/SecureSourceManager/src/V1/Hook.php b/SecureSourceManager/src/V1/Hook.php index 1881035cd344..e18abfdb8fda 100644 --- a/SecureSourceManager/src/V1/Hook.php +++ b/SecureSourceManager/src/V1/Hook.php @@ -57,7 +57,7 @@ class Hook extends \Google\Protobuf\Internal\Message /** * Output only. Unique identifier of the hook. * - * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { */ protected $uid = ''; /** @@ -292,7 +292,7 @@ public function setUpdateTime($var) /** * Output only. Unique identifier of the hook. * - * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { * @return string */ public function getUid() @@ -303,7 +303,7 @@ public function getUid() /** * Output only. Unique identifier of the hook. * - * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { * @param string $var * @return $this */ diff --git a/SecureSourceManager/src/V1/Instance.php b/SecureSourceManager/src/V1/Instance.php index a3c86d63f861..a5310a8becd3 100644 --- a/SecureSourceManager/src/V1/Instance.php +++ b/SecureSourceManager/src/V1/Instance.php @@ -16,7 +16,7 @@ class Instance extends \Google\Protobuf\Internal\Message { /** - * Optional. A unique identifier for an instance. The name should be of the + * Identifier. A unique identifier for an instance. The name should be of the * format: * `projects/{project_number}/locations/{location_id}/instances/{instance_id}` * `project_number`: Maps to a unique int64 id assigned to each project. @@ -26,7 +26,7 @@ class Instance extends \Google\Protobuf\Internal\Message * `instance_id`: User provided name for the instance, must be unique for a * project_number and location_id combination. * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; */ protected $name = ''; /** @@ -43,6 +43,10 @@ class Instance extends \Google\Protobuf\Internal\Message protected $update_time = null; /** * Optional. Labels as key value pairs. + * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/best-practices-labels#label_encoding). * * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -94,7 +98,7 @@ class Instance extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Optional. A unique identifier for an instance. The name should be of the + * Identifier. A unique identifier for an instance. The name should be of the * format: * `projects/{project_number}/locations/{location_id}/instances/{instance_id}` * `project_number`: Maps to a unique int64 id assigned to each project. @@ -109,6 +113,10 @@ class Instance extends \Google\Protobuf\Internal\Message * Output only. Update timestamp. * @type array|\Google\Protobuf\Internal\MapField $labels * Optional. Labels as key value pairs. + * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/best-practices-labels#label_encoding). * @type \Google\Cloud\SecureSourceManager\V1\Instance\PrivateConfig $private_config * Optional. Private settings for private instance. * @type int $state @@ -132,7 +140,7 @@ public function __construct($data = NULL) { } /** - * Optional. A unique identifier for an instance. The name should be of the + * Identifier. A unique identifier for an instance. The name should be of the * format: * `projects/{project_number}/locations/{location_id}/instances/{instance_id}` * `project_number`: Maps to a unique int64 id assigned to each project. @@ -142,7 +150,7 @@ public function __construct($data = NULL) { * `instance_id`: User provided name for the instance, must be unique for a * project_number and location_id combination. * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @return string */ public function getName() @@ -151,7 +159,7 @@ public function getName() } /** - * Optional. A unique identifier for an instance. The name should be of the + * Identifier. A unique identifier for an instance. The name should be of the * format: * `projects/{project_number}/locations/{location_id}/instances/{instance_id}` * `project_number`: Maps to a unique int64 id assigned to each project. @@ -161,7 +169,7 @@ public function getName() * `instance_id`: User provided name for the instance, must be unique for a * project_number and location_id combination. * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @param string $var * @return $this */ @@ -247,6 +255,10 @@ public function setUpdateTime($var) /** * Optional. Labels as key value pairs. + * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/best-practices-labels#label_encoding). * * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\MapField @@ -258,6 +270,10 @@ public function getLabels() /** * Optional. Labels as key value pairs. + * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. + * For more information, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/best-practices-labels#label_encoding). * * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param array|\Google\Protobuf\Internal\MapField $var diff --git a/SecureSourceManager/src/V1/Instance/PrivateConfig.php b/SecureSourceManager/src/V1/Instance/PrivateConfig.php index 10ed0389b9ed..d9216a90aa6e 100644 --- a/SecureSourceManager/src/V1/Instance/PrivateConfig.php +++ b/SecureSourceManager/src/V1/Instance/PrivateConfig.php @@ -50,6 +50,12 @@ class PrivateConfig extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated string psc_allowed_projects = 6 [(.google.api.field_behavior) = OPTIONAL]; */ private $psc_allowed_projects; + /** + * Optional. Custom host config for the instance. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.PrivateConfig.CustomHostConfig custom_host_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $custom_host_config = null; /** * Constructor. @@ -72,6 +78,8 @@ class PrivateConfig extends \Google\Protobuf\Internal\Message * Optional. Additional allowed projects for setting up PSC connections. * Instance host project is automatically allowed and does not need to be * included in this list. + * @type \Google\Cloud\SecureSourceManager\V1\Instance\PrivateConfig\CustomHostConfig $custom_host_config + * Optional. Custom host config for the instance. * } */ public function __construct($data = NULL) { @@ -219,5 +227,41 @@ public function setPscAllowedProjects($var) return $this; } + /** + * Optional. Custom host config for the instance. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.PrivateConfig.CustomHostConfig custom_host_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SecureSourceManager\V1\Instance\PrivateConfig\CustomHostConfig|null + */ + public function getCustomHostConfig() + { + return $this->custom_host_config; + } + + public function hasCustomHostConfig() + { + return isset($this->custom_host_config); + } + + public function clearCustomHostConfig() + { + unset($this->custom_host_config); + } + + /** + * Optional. Custom host config for the instance. + * + * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.PrivateConfig.CustomHostConfig custom_host_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SecureSourceManager\V1\Instance\PrivateConfig\CustomHostConfig $var + * @return $this + */ + public function setCustomHostConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\Instance\PrivateConfig\CustomHostConfig::class); + $this->custom_host_config = $var; + + return $this; + } + } diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/PrivateConfig/CustomHostConfig.php b/SecureSourceManager/src/V1/Instance/PrivateConfig/CustomHostConfig.php similarity index 100% rename from owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/PrivateConfig/CustomHostConfig.php rename to SecureSourceManager/src/V1/Instance/PrivateConfig/CustomHostConfig.php diff --git a/SecureSourceManager/src/V1/ListBranchRulesRequest.php b/SecureSourceManager/src/V1/ListBranchRulesRequest.php index 44a30eab405b..3134c3294373 100644 --- a/SecureSourceManager/src/V1/ListBranchRulesRequest.php +++ b/SecureSourceManager/src/V1/ListBranchRulesRequest.php @@ -20,10 +20,15 @@ class ListBranchRulesRequest extends \Google\Protobuf\Internal\Message */ protected $parent = ''; /** + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ protected $page_size = 0; /** + * Optional. A token identifying a page of results the server should return. + * * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; */ protected $page_token = ''; @@ -49,7 +54,10 @@ public static function build(string $parent): self * * @type string $parent * @type int $page_size + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. * @type string $page_token + * Optional. A token identifying a page of results the server should return. * } */ public function __construct($data = NULL) { @@ -80,6 +88,9 @@ public function setParent($var) } /** + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int */ @@ -89,6 +100,9 @@ public function getPageSize() } /** + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. + * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var * @return $this @@ -102,6 +116,8 @@ public function setPageSize($var) } /** + * Optional. A token identifying a page of results the server should return. + * * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ @@ -111,6 +127,8 @@ public function getPageToken() } /** + * Optional. A token identifying a page of results the server should return. + * * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this diff --git a/SecureSourceManager/src/V1/ListHooksRequest.php b/SecureSourceManager/src/V1/ListHooksRequest.php index 231cf3f5ba99..51871952979b 100644 --- a/SecureSourceManager/src/V1/ListHooksRequest.php +++ b/SecureSourceManager/src/V1/ListHooksRequest.php @@ -22,8 +22,8 @@ class ListHooksRequest extends \Google\Protobuf\Internal\Message */ protected $parent = ''; /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -58,8 +58,8 @@ public static function build(string $parent): self * @type string $parent * Required. Parent value for ListHooksRequest. * @type int $page_size - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. * @type string $page_token * Optional. A token identifying a page of results the server should return. * } @@ -96,8 +96,8 @@ public function setParent($var) } /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -108,8 +108,8 @@ public function getPageSize() } /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/SecureSourceManager/src/V1/ListInstancesRequest.php b/SecureSourceManager/src/V1/ListInstancesRequest.php index d7e9da305cf0..8b5a8d678aef 100644 --- a/SecureSourceManager/src/V1/ListInstancesRequest.php +++ b/SecureSourceManager/src/V1/ListInstancesRequest.php @@ -22,28 +22,28 @@ class ListInstancesRequest extends \Google\Protobuf\Internal\Message */ protected $parent = ''; /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. * - * Generated from protobuf field int32 page_size = 2; + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ protected $page_size = 0; /** - * A token identifying a page of results the server should return. + * Optional. A token identifying a page of results the server should return. * - * Generated from protobuf field string page_token = 3; + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; */ protected $page_token = ''; /** - * Filter for filtering results. + * Optional. Filter for filtering results. * - * Generated from protobuf field string filter = 4; + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; */ protected $filter = ''; /** - * Hint for how to order the results. + * Optional. Hint for how to order the results. * - * Generated from protobuf field string order_by = 5; + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; */ protected $order_by = ''; @@ -70,14 +70,14 @@ public static function build(string $parent): self * @type string $parent * Required. Parent value for ListInstancesRequest. * @type int $page_size - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. * @type string $page_token - * A token identifying a page of results the server should return. + * Optional. A token identifying a page of results the server should return. * @type string $filter - * Filter for filtering results. + * Optional. Filter for filtering results. * @type string $order_by - * Hint for how to order the results. + * Optional. Hint for how to order the results. * } */ public function __construct($data = NULL) { @@ -112,10 +112,10 @@ public function setParent($var) } /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. * - * Generated from protobuf field int32 page_size = 2; + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int */ public function getPageSize() @@ -124,10 +124,10 @@ public function getPageSize() } /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. * - * Generated from protobuf field int32 page_size = 2; + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var * @return $this */ @@ -140,9 +140,9 @@ public function setPageSize($var) } /** - * A token identifying a page of results the server should return. + * Optional. A token identifying a page of results the server should return. * - * Generated from protobuf field string page_token = 3; + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getPageToken() @@ -151,9 +151,9 @@ public function getPageToken() } /** - * A token identifying a page of results the server should return. + * Optional. A token identifying a page of results the server should return. * - * Generated from protobuf field string page_token = 3; + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -166,9 +166,9 @@ public function setPageToken($var) } /** - * Filter for filtering results. + * Optional. Filter for filtering results. * - * Generated from protobuf field string filter = 4; + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getFilter() @@ -177,9 +177,9 @@ public function getFilter() } /** - * Filter for filtering results. + * Optional. Filter for filtering results. * - * Generated from protobuf field string filter = 4; + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -192,9 +192,9 @@ public function setFilter($var) } /** - * Hint for how to order the results. + * Optional. Hint for how to order the results. * - * Generated from protobuf field string order_by = 5; + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getOrderBy() @@ -203,9 +203,9 @@ public function getOrderBy() } /** - * Hint for how to order the results. + * Optional. Hint for how to order the results. * - * Generated from protobuf field string order_by = 5; + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ diff --git a/SecureSourceManager/src/V1/ListIssueCommentsRequest.php b/SecureSourceManager/src/V1/ListIssueCommentsRequest.php index 3306038491bd..94df9bc21333 100644 --- a/SecureSourceManager/src/V1/ListIssueCommentsRequest.php +++ b/SecureSourceManager/src/V1/ListIssueCommentsRequest.php @@ -23,8 +23,8 @@ class ListIssueCommentsRequest extends \Google\Protobuf\Internal\Message */ protected $parent = ''; /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -61,8 +61,8 @@ public static function build(string $parent): self * Required. The issue in which to list the comments. Format: * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` * @type int $page_size - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. * @type string $page_token * Optional. A token identifying a page of results the server should return. * } @@ -101,8 +101,8 @@ public function setParent($var) } /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -113,8 +113,8 @@ public function getPageSize() } /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/SecureSourceManager/src/V1/ListIssuesRequest.php b/SecureSourceManager/src/V1/ListIssuesRequest.php index e62fdddb4b82..a8ac09ebc1b9 100644 --- a/SecureSourceManager/src/V1/ListIssuesRequest.php +++ b/SecureSourceManager/src/V1/ListIssuesRequest.php @@ -23,8 +23,8 @@ class ListIssuesRequest extends \Google\Protobuf\Internal\Message */ protected $parent = ''; /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -67,8 +67,8 @@ public static function build(string $parent): self * Required. The repository in which to list issues. Format: * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` * @type int $page_size - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. * @type string $page_token * Optional. A token identifying a page of results the server should return. * @type string $filter @@ -109,8 +109,8 @@ public function setParent($var) } /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -121,8 +121,8 @@ public function getPageSize() } /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/SecureSourceManager/src/V1/ListPullRequestCommentsRequest.php b/SecureSourceManager/src/V1/ListPullRequestCommentsRequest.php index 69060a8c7445..af4de23807bc 100644 --- a/SecureSourceManager/src/V1/ListPullRequestCommentsRequest.php +++ b/SecureSourceManager/src/V1/ListPullRequestCommentsRequest.php @@ -23,9 +23,8 @@ class ListPullRequestCommentsRequest extends \Google\Protobuf\Internal\Message */ protected $parent = ''; /** - * Optional. Requested page size. If unspecified, at most 100 pull request - * comments will be returned. The maximum value is 100; values above 100 will - * be coerced to 100. + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -62,9 +61,8 @@ public static function build(string $parent): self * 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}` * @type int $page_size - * Optional. Requested page size. If unspecified, at most 100 pull request - * comments will be returned. The maximum value is 100; values above 100 will - * be coerced to 100. + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. * @type string $page_token * Optional. A token identifying a page of results the server should return. * } @@ -103,9 +101,8 @@ public function setParent($var) } /** - * Optional. Requested page size. If unspecified, at most 100 pull request - * comments will be returned. The maximum value is 100; values above 100 will - * be coerced to 100. + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -116,9 +113,8 @@ public function getPageSize() } /** - * Optional. Requested page size. If unspecified, at most 100 pull request - * comments will be returned. The maximum value is 100; values above 100 will - * be coerced to 100. + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/SecureSourceManager/src/V1/ListPullRequestFileDiffsRequest.php b/SecureSourceManager/src/V1/ListPullRequestFileDiffsRequest.php index fe5d8cf40f75..4f3c0ed6584d 100644 --- a/SecureSourceManager/src/V1/ListPullRequestFileDiffsRequest.php +++ b/SecureSourceManager/src/V1/ListPullRequestFileDiffsRequest.php @@ -25,8 +25,8 @@ class ListPullRequestFileDiffsRequest extends \Google\Protobuf\Internal\Message */ protected $name = ''; /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -65,8 +65,8 @@ public static function build(string $name): self * Format: * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` * @type int $page_size - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. * @type string $page_token * Optional. A token identifying a page of results the server should return. * } @@ -107,8 +107,8 @@ public function setName($var) } /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -119,8 +119,8 @@ public function getPageSize() } /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/SecureSourceManager/src/V1/ListPullRequestsRequest.php b/SecureSourceManager/src/V1/ListPullRequestsRequest.php index adf26cf384d5..8da23667714b 100644 --- a/SecureSourceManager/src/V1/ListPullRequestsRequest.php +++ b/SecureSourceManager/src/V1/ListPullRequestsRequest.php @@ -23,8 +23,8 @@ class ListPullRequestsRequest extends \Google\Protobuf\Internal\Message */ protected $parent = ''; /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -61,8 +61,8 @@ public static function build(string $parent): self * Required. The repository in which to list pull requests. Format: * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` * @type int $page_size - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. * @type string $page_token * Optional. A token identifying a page of results the server should return. * } @@ -101,8 +101,8 @@ public function setParent($var) } /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -113,8 +113,8 @@ public function getPageSize() } /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var diff --git a/SecureSourceManager/src/V1/ListRepositoriesRequest.php b/SecureSourceManager/src/V1/ListRepositoriesRequest.php index 1aa29da41743..3fe139d5064c 100644 --- a/SecureSourceManager/src/V1/ListRepositoriesRequest.php +++ b/SecureSourceManager/src/V1/ListRepositoriesRequest.php @@ -22,16 +22,16 @@ class ListRepositoriesRequest extends \Google\Protobuf\Internal\Message */ protected $parent = ''; /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ protected $page_size = 0; /** - * A token identifying a page of results the server should return. + * Optional. A token identifying a page of results the server should return. * - * Generated from protobuf field string page_token = 3; + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; */ protected $page_token = ''; /** @@ -75,10 +75,10 @@ public static function build(string $parent): self * @type string $parent * Required. Parent value for ListRepositoriesRequest. * @type int $page_size - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. * @type string $page_token - * A token identifying a page of results the server should return. + * Optional. A token identifying a page of results the server should return. * @type string $filter * Optional. Filter results. * @type string $instance @@ -122,8 +122,8 @@ public function setParent($var) } /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -134,8 +134,8 @@ public function getPageSize() } /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. + * Optional. Requested page size. If unspecified, a default size of 30 will be + * used. The maximum value is 100; values above 100 will be coerced to 100. * * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var @@ -150,9 +150,9 @@ public function setPageSize($var) } /** - * A token identifying a page of results the server should return. + * Optional. A token identifying a page of results the server should return. * - * Generated from protobuf field string page_token = 3; + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getPageToken() @@ -161,9 +161,9 @@ public function getPageToken() } /** - * A token identifying a page of results the server should return. + * Optional. A token identifying a page of results the server should return. * - * Generated from protobuf field string page_token = 3; + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ diff --git a/SecureSourceManager/src/V1/PullRequest.php b/SecureSourceManager/src/V1/PullRequest.php index 8aaa08f72f81..8f6c0fd4ff36 100644 --- a/SecureSourceManager/src/V1/PullRequest.php +++ b/SecureSourceManager/src/V1/PullRequest.php @@ -17,11 +17,11 @@ class PullRequest extends \Google\Protobuf\Internal\Message { /** - * Output only. A unique identifier for a PullRequest. The number appended at - * the end is generated by the server. Format: + * Output only. Identifier. A unique identifier for a PullRequest. The number + * appended at the end is generated by the server. Format: * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request_id}` * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $name = ''; /** @@ -82,8 +82,8 @@ class PullRequest extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Output only. A unique identifier for a PullRequest. The number appended at - * the end is generated by the server. Format: + * Output only. Identifier. A unique identifier for a PullRequest. The number + * appended at the end is generated by the server. Format: * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request_id}` * @type string $title * Required. The pull request title. @@ -111,11 +111,11 @@ public function __construct($data = NULL) { } /** - * Output only. A unique identifier for a PullRequest. The number appended at - * the end is generated by the server. Format: + * Output only. Identifier. A unique identifier for a PullRequest. The number + * appended at the end is generated by the server. Format: * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request_id}` * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; * @return string */ public function getName() @@ -124,11 +124,11 @@ public function getName() } /** - * Output only. A unique identifier for a PullRequest. The number appended at - * the end is generated by the server. Format: + * Output only. Identifier. A unique identifier for a PullRequest. The number + * appended at the end is generated by the server. Format: * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request_id}` * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var * @return $this */ diff --git a/SecureSourceManager/src/V1/Repository.php b/SecureSourceManager/src/V1/Repository.php index 7901c4a6929f..bad0b241613b 100644 --- a/SecureSourceManager/src/V1/Repository.php +++ b/SecureSourceManager/src/V1/Repository.php @@ -16,11 +16,11 @@ class Repository extends \Google\Protobuf\Internal\Message { /** - * Optional. A unique identifier for a repository. The name should be of the + * Identifier. A unique identifier for a repository. The name should be of the * format: * `projects/{project}/locations/{location_id}/repositories/{repository_id}` * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; */ protected $name = ''; /** @@ -44,7 +44,7 @@ class Repository extends \Google\Protobuf\Internal\Message /** * Output only. Unique identifier of the repository. * - * Generated from protobuf field string uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field string uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { */ protected $uid = ''; /** @@ -87,7 +87,7 @@ class Repository extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Optional. A unique identifier for a repository. The name should be of the + * Identifier. A unique identifier for a repository. The name should be of the * format: * `projects/{project}/locations/{location_id}/repositories/{repository_id}` * @type string $description @@ -122,11 +122,11 @@ public function __construct($data = NULL) { } /** - * Optional. A unique identifier for a repository. The name should be of the + * Identifier. A unique identifier for a repository. The name should be of the * format: * `projects/{project}/locations/{location_id}/repositories/{repository_id}` * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @return string */ public function getName() @@ -135,11 +135,11 @@ public function getName() } /** - * Optional. A unique identifier for a repository. The name should be of the + * Identifier. A unique identifier for a repository. The name should be of the * format: * `projects/{project}/locations/{location_id}/repositories/{repository_id}` * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @param string $var * @return $this */ @@ -218,7 +218,7 @@ public function setInstance($var) /** * Output only. Unique identifier of the repository. * - * Generated from protobuf field string uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field string uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { * @return string */ public function getUid() @@ -229,7 +229,7 @@ public function getUid() /** * Output only. Unique identifier of the repository. * - * Generated from protobuf field string uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field string uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { * @param string $var * @return $this */ diff --git a/SecureSourceManager/src/V1/UpdateBranchRuleRequest.php b/SecureSourceManager/src/V1/UpdateBranchRuleRequest.php index 9b5dec141e25..66109374c7df 100644 --- a/SecureSourceManager/src/V1/UpdateBranchRuleRequest.php +++ b/SecureSourceManager/src/V1/UpdateBranchRuleRequest.php @@ -27,19 +27,19 @@ class UpdateBranchRuleRequest extends \Google\Protobuf\Internal\Message */ protected $validate_only = false; /** - * Required. Field mask is used to specify the fields to be overwritten in the + * Optional. 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. * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; */ protected $update_mask = null; /** * @param \Google\Cloud\SecureSourceManager\V1\BranchRule $branchRule - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * @param \Google\Protobuf\FieldMask $updateMask Optional. 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. @@ -67,7 +67,7 @@ public static function build(\Google\Cloud\SecureSourceManager\V1\BranchRule $br * Optional. If set, validate the request and preview the review, but do not * actually post it. (https://google.aip.dev/163, for declarative friendly) * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the + * Optional. 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. @@ -140,13 +140,13 @@ public function setValidateOnly($var) } /** - * Required. Field mask is used to specify the fields to be overwritten in the + * Optional. 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. * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\FieldMask|null */ public function getUpdateMask() @@ -165,13 +165,13 @@ public function clearUpdateMask() } /** - * Required. Field mask is used to specify the fields to be overwritten in the + * Optional. 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. * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Protobuf\FieldMask $var * @return $this */ diff --git a/SecureSourceManager/src/V1/UpdateHookRequest.php b/SecureSourceManager/src/V1/UpdateHookRequest.php index 7bfc6b0a5165..44200539befc 100644 --- a/SecureSourceManager/src/V1/UpdateHookRequest.php +++ b/SecureSourceManager/src/V1/UpdateHookRequest.php @@ -16,13 +16,13 @@ class UpdateHookRequest extends \Google\Protobuf\Internal\Message { /** - * Required. Field mask is used to specify the fields to be overwritten in the + * Optional. 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. * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; */ protected $update_mask = null; /** @@ -34,7 +34,7 @@ class UpdateHookRequest extends \Google\Protobuf\Internal\Message /** * @param \Google\Cloud\SecureSourceManager\V1\Hook $hook Required. The hook being updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * @param \Google\Protobuf\FieldMask $updateMask Optional. 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. @@ -58,7 +58,7 @@ public static function build(\Google\Cloud\SecureSourceManager\V1\Hook $hook, \G * Optional. Data for populating the Message object. * * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the + * Optional. 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. @@ -73,13 +73,13 @@ public function __construct($data = NULL) { } /** - * Required. Field mask is used to specify the fields to be overwritten in the + * Optional. 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. * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\FieldMask|null */ public function getUpdateMask() @@ -98,13 +98,13 @@ public function clearUpdateMask() } /** - * Required. Field mask is used to specify the fields to be overwritten in the + * Optional. 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. * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Protobuf\FieldMask $var * @return $this */ diff --git a/SecureSourceManager/src/V1/resources/secure_source_manager_rest_client_config.php b/SecureSourceManager/src/V1/resources/secure_source_manager_rest_client_config.php index e52272346a7d..242641e44cff 100644 --- a/SecureSourceManager/src/V1/resources/secure_source_manager_rest_client_config.php +++ b/SecureSourceManager/src/V1/resources/secure_source_manager_rest_client_config.php @@ -584,9 +584,6 @@ ], ], ], - 'queryParams' => [ - 'update_mask', - ], ], 'UpdateHook' => [ 'method' => 'patch', @@ -600,9 +597,6 @@ ], ], ], - 'queryParams' => [ - 'update_mask', - ], ], 'UpdateIssue' => [ 'method' => 'patch', diff --git a/SecureSourceManager/tests/Unit/V1/Client/SecureSourceManagerClientTest.php b/SecureSourceManager/tests/Unit/V1/Client/SecureSourceManagerClientTest.php index b7bd58a6c189..840b9d71e074 100644 --- a/SecureSourceManager/tests/Unit/V1/Client/SecureSourceManagerClientTest.php +++ b/SecureSourceManager/tests/Unit/V1/Client/SecureSourceManagerClientTest.php @@ -114,7 +114,6 @@ use Google\LongRunning\GetOperationRequest; use Google\LongRunning\Operation; use Google\Protobuf\Any; -use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; use Google\Rpc\Code; use stdClass; @@ -568,6 +567,7 @@ public function createBranchRuleTest() $requirePullRequest = false; $minimumReviewsCount = 672799098; $minimumApprovalsCount = 579210129; + $requireCodeOwnerApproval = false; $requireCommentsResolved = false; $allowStaleReviews = false; $requireLinearHistory = true; @@ -580,6 +580,7 @@ public function createBranchRuleTest() $expectedResponse->setRequirePullRequest($requirePullRequest); $expectedResponse->setMinimumReviewsCount($minimumReviewsCount); $expectedResponse->setMinimumApprovalsCount($minimumApprovalsCount); + $expectedResponse->setRequireCodeOwnerApproval($requireCodeOwnerApproval); $expectedResponse->setRequireCommentsResolved($requireCommentsResolved); $expectedResponse->setAllowStaleReviews($allowStaleReviews); $expectedResponse->setRequireLinearHistory($requireLinearHistory); @@ -2751,6 +2752,7 @@ public function getBranchRuleTest() $requirePullRequest = false; $minimumReviewsCount = 672799098; $minimumApprovalsCount = 579210129; + $requireCodeOwnerApproval = false; $requireCommentsResolved = false; $allowStaleReviews = false; $requireLinearHistory = true; @@ -2763,6 +2765,7 @@ public function getBranchRuleTest() $expectedResponse->setRequirePullRequest($requirePullRequest); $expectedResponse->setMinimumReviewsCount($minimumReviewsCount); $expectedResponse->setMinimumApprovalsCount($minimumApprovalsCount); + $expectedResponse->setRequireCodeOwnerApproval($requireCodeOwnerApproval); $expectedResponse->setRequireCommentsResolved($requireCommentsResolved); $expectedResponse->setAllowStaleReviews($allowStaleReviews); $expectedResponse->setRequireLinearHistory($requireLinearHistory); @@ -4898,6 +4901,7 @@ public function updateBranchRuleTest() $requirePullRequest = false; $minimumReviewsCount = 672799098; $minimumApprovalsCount = 579210129; + $requireCodeOwnerApproval = false; $requireCommentsResolved = false; $allowStaleReviews = false; $requireLinearHistory = true; @@ -4910,6 +4914,7 @@ public function updateBranchRuleTest() $expectedResponse->setRequirePullRequest($requirePullRequest); $expectedResponse->setMinimumReviewsCount($minimumReviewsCount); $expectedResponse->setMinimumApprovalsCount($minimumApprovalsCount); + $expectedResponse->setRequireCodeOwnerApproval($requireCodeOwnerApproval); $expectedResponse->setRequireCommentsResolved($requireCommentsResolved); $expectedResponse->setAllowStaleReviews($allowStaleReviews); $expectedResponse->setRequireLinearHistory($requireLinearHistory); @@ -4922,8 +4927,7 @@ public function updateBranchRuleTest() $operationsTransport->addResponse($completeOperation); // Mock request $branchRule = new BranchRule(); - $updateMask = new FieldMask(); - $request = (new UpdateBranchRuleRequest())->setBranchRule($branchRule)->setUpdateMask($updateMask); + $request = (new UpdateBranchRuleRequest())->setBranchRule($branchRule); $response = $gapicClient->updateBranchRule($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -4939,8 +4943,6 @@ public function updateBranchRuleTest() ); $actualValue = $actualApiRequestObject->getBranchRule(); $this->assertProtobufEquals($branchRule, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); $expectedOperationsRequestObject->setName('operations/updateBranchRuleTest'); $response->pollUntilComplete([ @@ -4996,8 +4998,7 @@ public function updateBranchRuleExceptionTest() $operationsTransport->addResponse(null, $status); // Mock request $branchRule = new BranchRule(); - $updateMask = new FieldMask(); - $request = (new UpdateBranchRuleRequest())->setBranchRule($branchRule)->setUpdateMask($updateMask); + $request = (new UpdateBranchRuleRequest())->setBranchRule($branchRule); $response = $gapicClient->updateBranchRule($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -5060,11 +5061,10 @@ public function updateHookTest() $completeOperation->setResponse($anyResponse); $operationsTransport->addResponse($completeOperation); // Mock request - $updateMask = new FieldMask(); $hook = new Hook(); $hookTargetUri = 'hookTargetUri737306680'; $hook->setTargetUri($hookTargetUri); - $request = (new UpdateHookRequest())->setUpdateMask($updateMask)->setHook($hook); + $request = (new UpdateHookRequest())->setHook($hook); $response = $gapicClient->updateHook($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); @@ -5075,8 +5075,6 @@ public function updateHookTest() $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/UpdateHook', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); $actualValue = $actualApiRequestObject->getHook(); $this->assertProtobufEquals($hook, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); @@ -5133,11 +5131,10 @@ public function updateHookExceptionTest() ); $operationsTransport->addResponse(null, $status); // Mock request - $updateMask = new FieldMask(); $hook = new Hook(); $hookTargetUri = 'hookTargetUri737306680'; $hook->setTargetUri($hookTargetUri); - $request = (new UpdateHookRequest())->setUpdateMask($updateMask)->setHook($hook); + $request = (new UpdateHookRequest())->setHook($hook); $response = $gapicClient->updateHook($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/GPBMetadata/Google/Cloud/Securesourcemanager/V1/SecureSourceManager.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/GPBMetadata/Google/Cloud/Securesourcemanager/V1/SecureSourceManager.php deleted file mode 100644 index 54a81fb3bfcc..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/GPBMetadata/Google/Cloud/Securesourcemanager/V1/SecureSourceManager.php +++ /dev/null @@ -1,35 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xE4\xEC\x01\x0A?google/cloud/securesourcemanager/v1/secure_source_manager.proto\x12#google.cloud.securesourcemanager.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x1Bgoogle/api/field_info.proto\x1A\x19google/api/resource.proto\x1A\x1Egoogle/iam/v1/iam_policy.proto\x1A\x1Agoogle/iam/v1/policy.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xED\x0D\x0A\x08Instance\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12N\x0A\x06labels\x18\x04 \x03(\x0B29.google.cloud.securesourcemanager.v1.Instance.LabelsEntryB\x03\xE0A\x01\x12X\x0A\x0Eprivate_config\x18\x0D \x01(\x0B2;.google.cloud.securesourcemanager.v1.Instance.PrivateConfigB\x03\xE0A\x01\x12G\x0A\x05state\x18\x05 \x01(\x0E23.google.cloud.securesourcemanager.v1.Instance.StateB\x03\xE0A\x03\x12P\x0A\x0Astate_note\x18\x0A \x01(\x0E27.google.cloud.securesourcemanager.v1.Instance.StateNoteB\x03\xE0A\x03\x12:\x0A\x07kms_key\x18\x0B \x01(\x09B)\xE0A\x05\xFAA#\x0A!cloudkms.googleapis.com/CryptoKey\x12R\x0A\x0Bhost_config\x18\x09 \x01(\x0B28.google.cloud.securesourcemanager.v1.Instance.HostConfigB\x03\xE0A\x03\x12\x82\x01\x0A\$workforce_identity_federation_config\x18\x0E \x01(\x0B2O.google.cloud.securesourcemanager.v1.Instance.WorkforceIdentityFederationConfigB\x03\xE0A\x01\x1A^\x0A\x0AHostConfig\x12\x11\x0A\x04html\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x10\x0A\x03api\x18\x02 \x01(\x09B\x03\xE0A\x03\x12\x15\x0A\x08git_http\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x14\x0A\x07git_ssh\x18\x04 \x01(\x09B\x03\xE0A\x03\x1A\x85\x04\x0A\x0DPrivateConfig\x12\x1A\x0A\x0Ais_private\x18\x01 \x01(\x08B\x06\xE0A\x05\xE0A\x02\x12;\x0A\x07ca_pool\x18\x02 \x01(\x09B*\xE0A\x05\xE0A\x01\xFAA!\x0A\x1Fprivateca.googleapis.com/CaPool\x12Q\x0A\x17http_service_attachment\x18\x03 \x01(\x09B0\xE0A\x03\xFAA*\x0A(compute.googleapis.com/ServiceAttachment\x12P\x0A\x16ssh_service_attachment\x18\x04 \x01(\x09B0\xE0A\x03\xFAA*\x0A(compute.googleapis.com/ServiceAttachment\x12!\x0A\x14psc_allowed_projects\x18\x06 \x03(\x09B\x03\xE0A\x01\x12m\x0A\x12custom_host_config\x18\x07 \x01(\x0B2L.google.cloud.securesourcemanager.v1.Instance.PrivateConfig.CustomHostConfigB\x03\xE0A\x01\x1Ad\x0A\x10CustomHostConfig\x12\x11\x0A\x04html\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x10\x0A\x03api\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\x14\x0A\x07git_ssh\x18\x03 \x01(\x09B\x03\xE0A\x02\x12\x15\x0A\x08git_http\x18\x04 \x01(\x09B\x03\xE0A\x02\x1A<\x0A!WorkforceIdentityFederationConfig\x12\x17\x0A\x07enabled\x18\x01 \x01(\x08B\x06\xE0A\x05\xE0A\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"_\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02\x12\x0C\x0A\x08DELETING\x10\x03\x12\x0A\x0A\x06PAUSED\x10\x04\x12\x0B\x0A\x07UNKNOWN\x10\x06\"_\x0A\x09StateNote\x12\x1A\x0A\x16STATE_NOTE_UNSPECIFIED\x10\x00\x12\x1B\x0A\x17PAUSED_CMEK_UNAVAILABLE\x10\x01\x12\x19\x0A\x11INSTANCE_RESUMING\x10\x02\x1A\x02\x08\x01:q\xEAAn\x0A+securesourcemanager.googleapis.com/Instance\x12.google.cloud.securesourcemanager.v1.PullRequestComment.ReviewB\x03\xE0A\x01H\x00\x12W\x0A\x07comment\x18\x05 \x01(\x0B2?.google.cloud.securesourcemanager.v1.PullRequestComment.CommentB\x03\xE0A\x01H\x00\x12Q\x0A\x04code\x18\x06 \x01(\x0B2<.google.cloud.securesourcemanager.v1.PullRequestComment.CodeB\x03\xE0A\x01H\x00\x1A\xFF\x01\x0A\x06Review\x12c\x0A\x0Baction_type\x18\x01 \x01(\x0E2I.google.cloud.securesourcemanager.v1.PullRequestComment.Review.ActionTypeB\x03\xE0A\x02\x12\x11\x0A\x04body\x18\x02 \x01(\x09B\x03\xE0A\x01\x12!\x0A\x14effective_commit_sha\x18\x04 \x01(\x09B\x03\xE0A\x03\"Z\x0A\x0AActionType\x12\x1B\x0A\x17ACTION_TYPE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07COMMENT\x10\x01\x12\x14\x0A\x10CHANGE_REQUESTED\x10\x02\x12\x0C\x0A\x08APPROVED\x10\x03\x1A\x1C\x0A\x07Comment\x12\x11\x0A\x04body\x18\x01 \x01(\x09B\x03\xE0A\x02\x1A\xE8\x01\x0A\x04Code\x12\x11\x0A\x04body\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x15\x0A\x05reply\x18\x02 \x01(\x09B\x06\xE0A\x01\xE0A\x04\x12W\x0A\x08position\x18\x03 \x01(\x0B2@.google.cloud.securesourcemanager.v1.PullRequestComment.PositionB\x03\xE0A\x01\x12#\x0A\x16effective_root_comment\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x15\x0A\x08resolved\x18\x05 \x01(\x08B\x03\xE0A\x03\x12!\x0A\x14effective_commit_sha\x18\x07 \x01(\x09B\x03\xE0A\x03\x1A0\x0A\x08Position\x12\x11\x0A\x04path\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x11\x0A\x04line\x18\x02 \x01(\x03B\x03\xE0A\x02:\xB8\x01\xEAA\xB4\x01\x0A5securesourcemanager.googleapis.com/PullRequestComment\x12{projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}/pullRequestComments/{comment}B\x10\x0A\x0Ecomment_detail\"\xB8\x01\x0A\x14ListInstancesRequest\x12C\x0A\x06parent\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x12+securesourcemanager.googleapis.com/Instance\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\"\x87\x01\x0A\x15ListInstancesResponse\x12@\x0A\x09instances\x18\x01 \x03(\x0B2-.google.cloud.securesourcemanager.v1.Instance\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"W\x0A\x12GetInstanceRequest\x12A\x0A\x04name\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+securesourcemanager.googleapis.com/Instance\"\xDD\x01\x0A\x15CreateInstanceRequest\x12C\x0A\x06parent\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x12+securesourcemanager.googleapis.com/Instance\x12\x18\x0A\x0Binstance_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12D\x0A\x08instance\x18\x03 \x01(\x0B2-.google.cloud.securesourcemanager.v1.InstanceB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\x8F\x01\x0A\x15DeleteInstanceRequest\x12A\x0A\x04name\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+securesourcemanager.googleapis.com/Instance\x12\x1F\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\x12\x12\x0A\x05force\x18\x03 \x01(\x08B\x03\xE0A\x01\"\x80\x02\x0A\x11OperationMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x121\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x06target\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04verb\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x1B\x0A\x0Estatus_message\x18\x05 \x01(\x09B\x03\xE0A\x03\x12#\x0A\x16requested_cancellation\x18\x06 \x01(\x08B\x03\xE0A\x03\x12\x18\x0A\x0Bapi_version\x18\x07 \x01(\x09B\x03\xE0A\x03\"\xED\x01\x0A\x17ListRepositoriesRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x12-securesourcemanager.googleapis.com/Repository\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12E\x0A\x08instance\x18\x05 \x01(\x09B3\xE0A\x01\xFAA-\x0A+securesourcemanager.googleapis.com/Instance\"z\x0A\x18ListRepositoriesResponse\x12E\x0A\x0Crepositories\x18\x01 \x03(\x0B2/.google.cloud.securesourcemanager.v1.Repository\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"[\x0A\x14GetRepositoryRequest\x12C\x0A\x04name\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\"\xC6\x01\x0A\x17CreateRepositoryRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x12-securesourcemanager.googleapis.com/Repository\x12H\x0A\x0Arepository\x18\x02 \x01(\x0B2/.google.cloud.securesourcemanager.v1.RepositoryB\x03\xE0A\x02\x12\x1A\x0A\x0Drepository_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"\xB5\x01\x0A\x17UpdateRepositoryRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12H\x0A\x0Arepository\x18\x02 \x01(\x0B2/.google.cloud.securesourcemanager.v1.RepositoryB\x03\xE0A\x02\x12\x1A\x0A\x0Dvalidate_only\x18\x03 \x01(\x08B\x03\xE0A\x01\"z\x0A\x17DeleteRepositoryRequest\x12C\x0A\x04name\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\x12\x1A\x0A\x0Dallow_missing\x18\x02 \x01(\x08B\x03\xE0A\x01\"\x84\x01\x0A\x10ListHooksRequest\x12?\x0A\x06parent\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x12'securesourcemanager.googleapis.com/Hook\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"f\x0A\x11ListHooksResponse\x128\x0A\x05hooks\x18\x01 \x03(\x0B2).google.cloud.securesourcemanager.v1.Hook\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"O\x0A\x0EGetHookRequest\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x0A'securesourcemanager.googleapis.com/Hook\"\xAE\x01\x0A\x11CreateHookRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\x12<\x0A\x04hook\x18\x02 \x01(\x0B2).google.cloud.securesourcemanager.v1.HookB\x03\xE0A\x02\x12\x14\x0A\x07hook_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"\x87\x01\x0A\x11UpdateHookRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12<\x0A\x04hook\x18\x02 \x01(\x0B2).google.cloud.securesourcemanager.v1.HookB\x03\xE0A\x02\"R\x0A\x11DeleteHookRequest\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x0A'securesourcemanager.googleapis.com/Hook\"[\x0A\x14GetBranchRuleRequest\x12C\x0A\x04name\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/BranchRule\"\xC8\x01\x0A\x17CreateBranchRuleRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x12-securesourcemanager.googleapis.com/BranchRule\x12I\x0A\x0Bbranch_rule\x18\x02 \x01(\x0B2/.google.cloud.securesourcemanager.v1.BranchRuleB\x03\xE0A\x02\x12\x1B\x0A\x0Ebranch_rule_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"\x90\x01\x0A\x16ListBranchRulesRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x12-securesourcemanager.googleapis.com/BranchRule\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"z\x0A\x17DeleteBranchRuleRequest\x12C\x0A\x04name\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/BranchRule\x12\x1A\x0A\x0Dallow_missing\x18\x02 \x01(\x08B\x03\xE0A\x01\"\xB6\x01\x0A\x17UpdateBranchRuleRequest\x12I\x0A\x0Bbranch_rule\x18\x01 \x01(\x0B2/.google.cloud.securesourcemanager.v1.BranchRuleB\x03\xE0A\x02\x12\x1A\x0A\x0Dvalidate_only\x18\x02 \x01(\x08B\x03\xE0A\x01\x124\x0A\x0Bupdate_mask\x18\x03 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"y\x0A\x17ListBranchRulesResponse\x12E\x0A\x0Cbranch_rules\x18\x01 \x03(\x0B2/.google.cloud.securesourcemanager.v1.BranchRule\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xAE\x01\x0A\x18CreatePullRequestRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\x12K\x0A\x0Cpull_request\x18\x02 \x01(\x0B20.google.cloud.securesourcemanager.v1.PullRequestB\x03\xE0A\x02\"]\x0A\x15GetPullRequestRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.securesourcemanager.googleapis.com/PullRequest\"\x91\x01\x0A\x17ListPullRequestsRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"|\x0A\x18ListPullRequestsResponse\x12G\x0A\x0Dpull_requests\x18\x01 \x03(\x0B20.google.cloud.securesourcemanager.v1.PullRequest\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x9D\x01\x0A\x18UpdatePullRequestRequest\x12K\x0A\x0Cpull_request\x18\x01 \x01(\x0B20.google.cloud.securesourcemanager.v1.PullRequestB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"_\x0A\x17MergePullRequestRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.securesourcemanager.googleapis.com/PullRequest\"^\x0A\x16OpenPullRequestRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.securesourcemanager.googleapis.com/PullRequest\"_\x0A\x17ClosePullRequestRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.securesourcemanager.googleapis.com/PullRequest\"\x98\x01\x0A\x1FListPullRequestFileDiffsRequest\x12D\x0A\x04name\x18\x01 \x01(\x09B6\xE0A\x02\xFAA0\x0A.securesourcemanager.googleapis.com/PullRequest\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"~\x0A ListPullRequestFileDiffsResponse\x12A\x0A\x0Afile_diffs\x18\x01 \x03(\x0B2-.google.cloud.securesourcemanager.v1.FileDiff\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x9B\x01\x0A\x12CreateIssueRequest\x12E\x0A\x06parent\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\x12>\x0A\x05issue\x18\x02 \x01(\x0B2*.google.cloud.securesourcemanager.v1.IssueB\x03\xE0A\x02\"Q\x0A\x0FGetIssueRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(securesourcemanager.googleapis.com/Issue\"\x9B\x01\x0A\x11ListIssuesRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x12(securesourcemanager.googleapis.com/Issue\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\"i\x0A\x12ListIssuesResponse\x12:\x0A\x06issues\x18\x01 \x03(\x0B2*.google.cloud.securesourcemanager.v1.Issue\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x8A\x01\x0A\x12UpdateIssueRequest\x12>\x0A\x05issue\x18\x01 \x01(\x0B2*.google.cloud.securesourcemanager.v1.IssueB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"g\x0A\x12DeleteIssueRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(securesourcemanager.googleapis.com/Issue\x12\x11\x0A\x04etag\x18\x02 \x01(\x09B\x03\xE0A\x01\"f\x0A\x11CloseIssueRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(securesourcemanager.googleapis.com/Issue\x12\x11\x0A\x04etag\x18\x02 \x01(\x09B\x03\xE0A\x01\"e\x0A\x10OpenIssueRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(securesourcemanager.googleapis.com/Issue\x12\x11\x0A\x04etag\x18\x02 \x01(\x09B\x03\xE0A\x01\"\xEF\x01\x0A\x09TreeEntry\x12L\x0A\x04type\x18\x01 \x01(\x0E29.google.cloud.securesourcemanager.v1.TreeEntry.ObjectTypeB\x03\xE0A\x03\x12\x10\x0A\x03sha\x18\x02 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04path\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04mode\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04size\x18\x05 \x01(\x03B\x03\xE0A\x03\"I\x0A\x0AObjectType\x12\x1B\x0A\x17OBJECT_TYPE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04TREE\x10\x01\x12\x08\x0A\x04BLOB\x10\x02\x12\x0A\x0A\x06COMMIT\x10\x03\"\xB8\x01\x0A\x10FetchTreeRequest\x12I\x0A\x0Arepository\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\x12\x10\x0A\x03ref\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x16\x0A\x09recursive\x18\x03 \x01(\x08B\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x04 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x05 \x01(\x09B\x03\xE0A\x01\"r\x0A\x11FetchTreeResponse\x12D\x0A\x0Ctree_entries\x18\x01 \x03(\x0B2..google.cloud.securesourcemanager.v1.TreeEntry\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"o\x0A\x10FetchBlobRequest\x12I\x0A\x0Arepository\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-securesourcemanager.googleapis.com/Repository\x12\x10\x0A\x03sha\x18\x02 \x01(\x09B\x03\xE0A\x02\"1\x0A\x11FetchBlobResponse\x12\x0B\x0A\x03sha\x18\x01 \x01(\x09\x12\x0F\x0A\x07content\x18\x02 \x01(\x09\"\xA0\x01\x0A\x1EListPullRequestCommentsRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125securesourcemanager.googleapis.com/PullRequestComment\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x92\x01\x0A\x1FListPullRequestCommentsResponse\x12V\x0A\x15pull_request_comments\x18\x01 \x03(\x0B27.google.cloud.securesourcemanager.v1.PullRequestComment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xCC\x01\x0A\x1FCreatePullRequestCommentRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125securesourcemanager.googleapis.com/PullRequestComment\x12Z\x0A\x14pull_request_comment\x18\x02 \x01(\x0B27.google.cloud.securesourcemanager.v1.PullRequestCommentB\x03\xE0A\x02\"\xD3\x01\x0A%BatchCreatePullRequestCommentsRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125securesourcemanager.googleapis.com/PullRequestComment\x12[\x0A\x08requests\x18\x02 \x03(\x0B2D.google.cloud.securesourcemanager.v1.CreatePullRequestCommentRequestB\x03\xE0A\x02\"\x80\x01\x0A&BatchCreatePullRequestCommentsResponse\x12V\x0A\x15pull_request_comments\x18\x01 \x03(\x0B27.google.cloud.securesourcemanager.v1.PullRequestComment\"\xB3\x01\x0A\x1FUpdatePullRequestCommentRequest\x12Z\x0A\x14pull_request_comment\x18\x01 \x01(\x0B27.google.cloud.securesourcemanager.v1.PullRequestCommentB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"n\x0A\x1FDeletePullRequestCommentRequest\x12K\x0A\x04name\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x0A5securesourcemanager.googleapis.com/PullRequestComment\"k\x0A\x1CGetPullRequestCommentRequest\x12K\x0A\x04name\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x0A5securesourcemanager.googleapis.com/PullRequestComment\"\xD8\x01\x0A!ResolvePullRequestCommentsRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125securesourcemanager.googleapis.com/PullRequestComment\x12L\x0A\x05names\x18\x02 \x03(\x09B=\xE0A\x02\xFAA7\x0A5securesourcemanager.googleapis.com/PullRequestComment\x12\x16\x0A\x09auto_fill\x18\x03 \x01(\x08B\x03\xE0A\x01\"|\x0A\"ResolvePullRequestCommentsResponse\x12V\x0A\x15pull_request_comments\x18\x01 \x03(\x0B27.google.cloud.securesourcemanager.v1.PullRequestComment\"\xDA\x01\x0A#UnresolvePullRequestCommentsRequest\x12M\x0A\x06parent\x18\x01 \x01(\x09B=\xE0A\x02\xFAA7\x125securesourcemanager.googleapis.com/PullRequestComment\x12L\x0A\x05names\x18\x02 \x03(\x09B=\xE0A\x02\xFAA7\x0A5securesourcemanager.googleapis.com/PullRequestComment\x12\x16\x0A\x09auto_fill\x18\x03 \x01(\x08B\x03\xE0A\x01\"~\x0A\$UnresolvePullRequestCommentsResponse\x12V\x0A\x15pull_request_comments\x18\x01 \x03(\x0B27.google.cloud.securesourcemanager.v1.PullRequestComment\"\xAC\x01\x0A\x19CreateIssueCommentRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(securesourcemanager.googleapis.com/Issue\x12M\x0A\x0Dissue_comment\x18\x02 \x01(\x0B21.google.cloud.securesourcemanager.v1.IssueCommentB\x03\xE0A\x02\"_\x0A\x16GetIssueCommentRequest\x12E\x0A\x04name\x18\x01 \x01(\x09B7\xE0A\x02\xFAA1\x0A/securesourcemanager.googleapis.com/IssueComment\"\x94\x01\x0A\x18ListIssueCommentsRequest\x12G\x0A\x06parent\x18\x01 \x01(\x09B7\xE0A\x02\xFAA1\x12/securesourcemanager.googleapis.com/IssueComment\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x7F\x0A\x19ListIssueCommentsResponse\x12I\x0A\x0Eissue_comments\x18\x01 \x03(\x0B21.google.cloud.securesourcemanager.v1.IssueComment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xA0\x01\x0A\x19UpdateIssueCommentRequest\x12M\x0A\x0Dissue_comment\x18\x01 \x01(\x0B21.google.cloud.securesourcemanager.v1.IssueCommentB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"b\x0A\x19DeleteIssueCommentRequest\x12E\x0A\x04name\x18\x01 \x01(\x09B7\xE0A\x02\xFAA1\x0A/securesourcemanager.googleapis.com/IssueComment2\xFEd\x0A\x13SecureSourceManager\x12\xC6\x01\x0A\x0DListInstances\x129.google.cloud.securesourcemanager.v1.ListInstancesRequest\x1A:.google.cloud.securesourcemanager.v1.ListInstancesResponse\">\xDAA\x06parent\x82\xD3\xE4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/instances\x12\xB3\x01\x0A\x0BGetInstance\x127.google.cloud.securesourcemanager.v1.GetInstanceRequest\x1A-.google.cloud.securesourcemanager.v1.Instance\"<\xDAA\x04name\x82\xD3\xE4\x93\x02/\x12-/v1/{name=projects/*/locations/*/instances/*}\x12\xEA\x01\x0A\x0ECreateInstance\x12:.google.cloud.securesourcemanager.v1.CreateInstanceRequest\x1A\x1D.google.longrunning.Operation\"}\xCAA\x1D\x0A\x08Instance\x12\x11OperationMetadata\xDAA\x1Bparent,instance,instance_id\x82\xD3\xE4\x93\x029\"-/v1/{parent=projects/*/locations/*}/instances:\x08instance\x12\xD6\x01\x0A\x0EDeleteInstance\x12:.google.cloud.securesourcemanager.v1.DeleteInstanceRequest\x1A\x1D.google.longrunning.Operation\"i\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02/*-/v1/{name=projects/*/locations/*/instances/*}\x12\xD2\x01\x0A\x10ListRepositories\x12<.google.cloud.securesourcemanager.v1.ListRepositoriesRequest\x1A=.google.cloud.securesourcemanager.v1.ListRepositoriesResponse\"A\xDAA\x06parent\x82\xD3\xE4\x93\x022\x120/v1/{parent=projects/*/locations/*}/repositories\x12\xBC\x01\x0A\x0DGetRepository\x129.google.cloud.securesourcemanager.v1.GetRepositoryRequest\x1A/.google.cloud.securesourcemanager.v1.Repository\"?\xDAA\x04name\x82\xD3\xE4\x93\x022\x120/v1/{name=projects/*/locations/*/repositories/*}\x12\xFA\x01\x0A\x10CreateRepository\x12<.google.cloud.securesourcemanager.v1.CreateRepositoryRequest\x1A\x1D.google.longrunning.Operation\"\x88\x01\xCAA\x1F\x0A\x0ARepository\x12\x11OperationMetadata\xDAA\x1Fparent,repository,repository_id\x82\xD3\xE4\x93\x02>\"0/v1/{parent=projects/*/locations/*}/repositories:\x0Arepository\x12\xFC\x01\x0A\x10UpdateRepository\x12<.google.cloud.securesourcemanager.v1.UpdateRepositoryRequest\x1A\x1D.google.longrunning.Operation\"\x8A\x01\xCAA\x1F\x0A\x0ARepository\x12\x11OperationMetadata\xDAA\x16repository,update_mask\x82\xD3\xE4\x93\x02I2;/v1/{repository.name=projects/*/locations/*/repositories/*}:\x0Arepository\x12\xDD\x01\x0A\x10DeleteRepository\x12<.google.cloud.securesourcemanager.v1.DeleteRepositoryRequest\x1A\x1D.google.longrunning.Operation\"l\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x022*0/v1/{name=projects/*/locations/*/repositories/*}\x12\xC5\x01\x0A\x09ListHooks\x125.google.cloud.securesourcemanager.v1.ListHooksRequest\x1A6.google.cloud.securesourcemanager.v1.ListHooksResponse\"I\xDAA\x06parent\x82\xD3\xE4\x93\x02:\x128/v1/{parent=projects/*/locations/*/repositories/*}/hooks\x12\xB2\x01\x0A\x07GetHook\x123.google.cloud.securesourcemanager.v1.GetHookRequest\x1A).google.cloud.securesourcemanager.v1.Hook\"G\xDAA\x04name\x82\xD3\xE4\x93\x02:\x128/v1/{name=projects/*/locations/*/repositories/*/hooks/*}\x12\xDD\x01\x0A\x0ACreateHook\x126.google.cloud.securesourcemanager.v1.CreateHookRequest\x1A\x1D.google.longrunning.Operation\"x\xCAA\x19\x0A\x04Hook\x12\x11OperationMetadata\xDAA\x13parent,hook,hook_id\x82\xD3\xE4\x93\x02@\"8/v1/{parent=projects/*/locations/*/repositories/*}/hooks:\x04hook\x12\xDF\x01\x0A\x0AUpdateHook\x126.google.cloud.securesourcemanager.v1.UpdateHookRequest\x1A\x1D.google.longrunning.Operation\"z\xCAA\x19\x0A\x04Hook\x12\x11OperationMetadata\xDAA\x10hook,update_mask\x82\xD3\xE4\x93\x02E2=/v1/{hook.name=projects/*/locations/*/repositories/*/hooks/*}:\x04hook\x12\xD9\x01\x0A\x0ADeleteHook\x126.google.cloud.securesourcemanager.v1.DeleteHookRequest\x1A\x1D.google.longrunning.Operation\"t\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02:*8/v1/{name=projects/*/locations/*/repositories/*/hooks/*}\x12\xA3\x01\x0A\x10GetIamPolicyRepo\x12\".google.iam.v1.GetIamPolicyRequest\x1A\x15.google.iam.v1.Policy\"T\xDAA\x08resource\x82\xD3\xE4\x93\x02C\x12A/v1/{resource=projects/*/locations/*/repositories/*}:getIamPolicy\x12\xA6\x01\x0A\x10SetIamPolicyRepo\x12\".google.iam.v1.SetIamPolicyRequest\x1A\x15.google.iam.v1.Policy\"W\xDAA\x08resource\x82\xD3\xE4\x93\x02F\"A/v1/{resource=projects/*/locations/*/repositories/*}:setIamPolicy:\x01*\x12\xCC\x01\x0A\x16TestIamPermissionsRepo\x12(.google.iam.v1.TestIamPermissionsRequest\x1A).google.iam.v1.TestIamPermissionsResponse\"]\xDAA\x08resource\x82\xD3\xE4\x93\x02L\"G/v1/{resource=projects/*/locations/*/repositories/*}:testIamPermissions:\x01*\x12\x8B\x02\x0A\x10CreateBranchRule\x12<.google.cloud.securesourcemanager.v1.CreateBranchRuleRequest\x1A\x1D.google.longrunning.Operation\"\x99\x01\xCAA\x1F\x0A\x0ABranchRule\x12\x11OperationMetadata\xDAA!parent,branch_rule,branch_rule_id\x82\xD3\xE4\x93\x02M\">/v1/{parent=projects/*/locations/*/repositories/*}/branchRules:\x0Bbranch_rule\x12\xDD\x01\x0A\x0FListBranchRules\x12;.google.cloud.securesourcemanager.v1.ListBranchRulesRequest\x1A<.google.cloud.securesourcemanager.v1.ListBranchRulesResponse\"O\xDAA\x06parent\x82\xD3\xE4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/repositories/*}/branchRules\x12\xCA\x01\x0A\x0DGetBranchRule\x129.google.cloud.securesourcemanager.v1.GetBranchRuleRequest\x1A/.google.cloud.securesourcemanager.v1.BranchRule\"M\xDAA\x04name\x82\xD3\xE4\x93\x02@\x12>/v1/{name=projects/*/locations/*/repositories/*/branchRules/*}\x12\x8D\x02\x0A\x10UpdateBranchRule\x12<.google.cloud.securesourcemanager.v1.UpdateBranchRuleRequest\x1A\x1D.google.longrunning.Operation\"\x9B\x01\xCAA\x1F\x0A\x0ABranchRule\x12\x11OperationMetadata\xDAA\x17branch_rule,update_mask\x82\xD3\xE4\x93\x02Y2J/v1/{branch_rule.name=projects/*/locations/*/repositories/*/branchRules/*}:\x0Bbranch_rule\x12\xEB\x01\x0A\x10DeleteBranchRule\x12<.google.cloud.securesourcemanager.v1.DeleteBranchRuleRequest\x1A\x1D.google.longrunning.Operation\"z\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02@*>/v1/{name=projects/*/locations/*/repositories/*/branchRules/*}\x12\xA6\x02\x0A\x11CreatePullRequest\x12=.google.cloud.securesourcemanager.v1.CreatePullRequestRequest\x1A\x1D.google.longrunning.Operation\"\xB2\x01\xCAAD\x0A/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xDAA\x13parent,pull_request\x82\xD3\xE4\x93\x02O\"?/v1/{parent=projects/*/locations/*/repositories/*}/pullRequests:\x0Cpull_request\x12\xCE\x01\x0A\x0EGetPullRequest\x12:.google.cloud.securesourcemanager.v1.GetPullRequestRequest\x1A0.google.cloud.securesourcemanager.v1.PullRequest\"N\xDAA\x04name\x82\xD3\xE4\x93\x02A\x12?/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}\x12\xE1\x01\x0A\x10ListPullRequests\x12<.google.cloud.securesourcemanager.v1.ListPullRequestsRequest\x1A=.google.cloud.securesourcemanager.v1.ListPullRequestsResponse\"P\xDAA\x06parent\x82\xD3\xE4\x93\x02A\x12?/v1/{parent=projects/*/locations/*/repositories/*}/pullRequests\x12\xB8\x02\x0A\x11UpdatePullRequest\x12=.google.cloud.securesourcemanager.v1.UpdatePullRequestRequest\x1A\x1D.google.longrunning.Operation\"\xC4\x01\xCAAD\x0A/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xDAA\x18pull_request,update_mask\x82\xD3\xE4\x93\x02\\2L/v1/{pull_request.name=projects/*/locations/*/repositories/*/pullRequests/*}:\x0Cpull_request\x12\x90\x02\x0A\x10MergePullRequest\x12<.google.cloud.securesourcemanager.v1.MergePullRequestRequest\x1A\x1D.google.longrunning.Operation\"\x9E\x01\xCAAD\x0A/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02J\"E/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:merge:\x01*\x12\x8D\x02\x0A\x0FOpenPullRequest\x12;.google.cloud.securesourcemanager.v1.OpenPullRequestRequest\x1A\x1D.google.longrunning.Operation\"\x9D\x01\xCAAD\x0A/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02I\"D/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:open:\x01*\x12\x90\x02\x0A\x10ClosePullRequest\x12<.google.cloud.securesourcemanager.v1.ClosePullRequestRequest\x1A\x1D.google.longrunning.Operation\"\x9E\x01\xCAAD\x0A/google.cloud.securesourcemanager.v1.PullRequest\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02J\"E/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:close:\x01*\x12\x85\x02\x0A\x18ListPullRequestFileDiffs\x12D.google.cloud.securesourcemanager.v1.ListPullRequestFileDiffsRequest\x1AE.google.cloud.securesourcemanager.v1.ListPullRequestFileDiffsResponse\"\\\xDAA\x04name\x82\xD3\xE4\x93\x02O\x12M/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:listFileDiffs\x12\xC4\x01\x0A\x09FetchTree\x125.google.cloud.securesourcemanager.v1.FetchTreeRequest\x1A6.google.cloud.securesourcemanager.v1.FetchTreeResponse\"H\x82\xD3\xE4\x93\x02B\x12@/v1/{repository=projects/*/locations/*/repositories/*}:fetchTree\x12\xC4\x01\x0A\x09FetchBlob\x125.google.cloud.securesourcemanager.v1.FetchBlobRequest\x1A6.google.cloud.securesourcemanager.v1.FetchBlobResponse\"H\x82\xD3\xE4\x93\x02B\x12@/v1/{repository=projects/*/locations/*/repositories/*}:fetchBlob\x12\x80\x02\x0A\x0BCreateIssue\x127.google.cloud.securesourcemanager.v1.CreateIssueRequest\x1A\x1D.google.longrunning.Operation\"\x98\x01\xCAA>\x0A)google.cloud.securesourcemanager.v1.Issue\x12\x11OperationMetadata\xDAA\x0Cparent,issue\x82\xD3\xE4\x93\x02B\"9/v1/{parent=projects/*/locations/*/repositories/*}/issues:\x05issue\x12\xB6\x01\x0A\x08GetIssue\x124.google.cloud.securesourcemanager.v1.GetIssueRequest\x1A*.google.cloud.securesourcemanager.v1.Issue\"H\xDAA\x04name\x82\xD3\xE4\x93\x02;\x129/v1/{name=projects/*/locations/*/repositories/*/issues/*}\x12\xC9\x01\x0A\x0AListIssues\x126.google.cloud.securesourcemanager.v1.ListIssuesRequest\x1A7.google.cloud.securesourcemanager.v1.ListIssuesResponse\"J\xDAA\x06parent\x82\xD3\xE4\x93\x02;\x129/v1/{parent=projects/*/locations/*/repositories/*}/issues\x12\x8B\x02\x0A\x0BUpdateIssue\x127.google.cloud.securesourcemanager.v1.UpdateIssueRequest\x1A\x1D.google.longrunning.Operation\"\xA3\x01\xCAA>\x0A)google.cloud.securesourcemanager.v1.Issue\x12\x11OperationMetadata\xDAA\x11issue,update_mask\x82\xD3\xE4\x93\x02H2?/v1/{issue.name=projects/*/locations/*/repositories/*/issues/*}:\x05issue\x12\xDC\x01\x0A\x0BDeleteIssue\x127.google.cloud.securesourcemanager.v1.DeleteIssueRequest\x1A\x1D.google.longrunning.Operation\"u\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02;*9/v1/{name=projects/*/locations/*/repositories/*/issues/*}\x12\xF5\x01\x0A\x09OpenIssue\x125.google.cloud.securesourcemanager.v1.OpenIssueRequest\x1A\x1D.google.longrunning.Operation\"\x91\x01\xCAA>\x0A)google.cloud.securesourcemanager.v1.Issue\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02C\">/v1/{name=projects/*/locations/*/repositories/*/issues/*}:open:\x01*\x12\xF8\x01\x0A\x0ACloseIssue\x126.google.cloud.securesourcemanager.v1.CloseIssueRequest\x1A\x1D.google.longrunning.Operation\"\x92\x01\xCAA>\x0A)google.cloud.securesourcemanager.v1.Issue\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02D\"?/v1/{name=projects/*/locations/*/repositories/*/issues/*}:close:\x01*\x12\xF9\x01\x0A\x15GetPullRequestComment\x12A.google.cloud.securesourcemanager.v1.GetPullRequestCommentRequest\x1A7.google.cloud.securesourcemanager.v1.PullRequestComment\"d\xDAA\x04name\x82\xD3\xE4\x93\x02W\x12U/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*/pullRequestComments/*}\x12\x8C\x02\x0A\x17ListPullRequestComments\x12C.google.cloud.securesourcemanager.v1.ListPullRequestCommentsRequest\x1AD.google.cloud.securesourcemanager.v1.ListPullRequestCommentsResponse\"f\xDAA\x06parent\x82\xD3\xE4\x93\x02W\x12U/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments\x12\xE1\x02\x0A\x18CreatePullRequestComment\x12D.google.cloud.securesourcemanager.v1.CreatePullRequestCommentRequest\x1A\x1D.google.longrunning.Operation\"\xDF\x01\xCAAK\x0A6google.cloud.securesourcemanager.v1.PullRequestComment\x12\x11OperationMetadata\xDAA\x1Bparent,pull_request_comment\x82\xD3\xE4\x93\x02m\"U/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:\x14pull_request_comment\x12\xFC\x02\x0A\x18UpdatePullRequestComment\x12D.google.cloud.securesourcemanager.v1.UpdatePullRequestCommentRequest\x1A\x1D.google.longrunning.Operation\"\xFA\x01\xCAAK\x0A6google.cloud.securesourcemanager.v1.PullRequestComment\x12\x11OperationMetadata\xDAA pull_request_comment,update_mask\x82\xD3\xE4\x93\x02\x82\x012j/v1/{pull_request_comment.name=projects/*/locations/*/repositories/*/pullRequests/*/pullRequestComments/*}:\x14pull_request_comment\x12\x93\x02\x0A\x18DeletePullRequestComment\x12D.google.cloud.securesourcemanager.v1.DeletePullRequestCommentRequest\x1A\x1D.google.longrunning.Operation\"\x91\x01\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02W*U/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*/pullRequestComments/*}\x12\xCA\x02\x0A\x1EBatchCreatePullRequestComments\x12J.google.cloud.securesourcemanager.v1.BatchCreatePullRequestCommentsRequest\x1A\x1D.google.longrunning.Operation\"\xBC\x01\xCAA;\x0A&BatchCreatePullRequestCommentsResponse\x12\x11OperationMetadata\xDAA\x0Fparent,requests\x82\xD3\xE4\x93\x02f\"a/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:batchCreate:\x01*\x12\xB7\x02\x0A\x1AResolvePullRequestComments\x12F.google.cloud.securesourcemanager.v1.ResolvePullRequestCommentsRequest\x1A\x1D.google.longrunning.Operation\"\xB1\x01\xCAA7\x0A\"ResolvePullRequestCommentsResponse\x12\x11OperationMetadata\xDAA\x0Cparent,names\x82\xD3\xE4\x93\x02b\"]/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:resolve:\x01*\x12\xBF\x02\x0A\x1CUnresolvePullRequestComments\x12H.google.cloud.securesourcemanager.v1.UnresolvePullRequestCommentsRequest\x1A\x1D.google.longrunning.Operation\"\xB5\x01\xCAA9\x0A\$UnresolvePullRequestCommentsResponse\x12\x11OperationMetadata\xDAA\x0Cparent,names\x82\xD3\xE4\x93\x02d\"_/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:unresolve:\x01*\x12\xB5\x02\x0A\x12CreateIssueComment\x12>.google.cloud.securesourcemanager.v1.CreateIssueCommentRequest\x1A\x1D.google.longrunning.Operation\"\xBF\x01\xCAAE\x0A0google.cloud.securesourcemanager.v1.IssueComment\x12\x11OperationMetadata\xDAA\x14parent,issue_comment\x82\xD3\xE4\x93\x02Z\"I/v1/{parent=projects/*/locations/*/repositories/*/issues/*}/issueComments:\x0Dissue_comment\x12\xDB\x01\x0A\x0FGetIssueComment\x12;.google.cloud.securesourcemanager.v1.GetIssueCommentRequest\x1A1.google.cloud.securesourcemanager.v1.IssueComment\"X\xDAA\x04name\x82\xD3\xE4\x93\x02K\x12I/v1/{name=projects/*/locations/*/repositories/*/issues/*/issueComments/*}\x12\xEE\x01\x0A\x11ListIssueComments\x12=.google.cloud.securesourcemanager.v1.ListIssueCommentsRequest\x1A>.google.cloud.securesourcemanager.v1.ListIssueCommentsResponse\"Z\xDAA\x06parent\x82\xD3\xE4\x93\x02K\x12I/v1/{parent=projects/*/locations/*/repositories/*/issues/*}/issueComments\x12\xC8\x02\x0A\x12UpdateIssueComment\x12>.google.cloud.securesourcemanager.v1.UpdateIssueCommentRequest\x1A\x1D.google.longrunning.Operation\"\xD2\x01\xCAAE\x0A0google.cloud.securesourcemanager.v1.IssueComment\x12\x11OperationMetadata\xDAA\x19issue_comment,update_mask\x82\xD3\xE4\x93\x02h2W/v1/{issue_comment.name=projects/*/locations/*/repositories/*/issues/*/issueComments/*}:\x0Dissue_comment\x12\xFB\x01\x0A\x12DeleteIssueComment\x12>.google.cloud.securesourcemanager.v1.DeleteIssueCommentRequest\x1A\x1D.google.longrunning.Operation\"\x85\x01\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02K*I/v1/{name=projects/*/locations/*/repositories/*/issues/*/issueComments/*}\x1AV\xCAA\"securesourcemanager.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xE9\x04\x0A'com.google.cloud.securesourcemanager.v1B\x18SecureSourceManagerProtoP\x01ZYcloud.google.com/go/securesourcemanager/apiv1/securesourcemanagerpb;securesourcemanagerpb\xAA\x02#Google.Cloud.SecureSourceManager.V1\xCA\x02#Google\\Cloud\\SecureSourceManager\\V1\xEA\x02&Google::Cloud::SecureSourceManager::V1\xEAAx\x0A!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xEAA\\\x0A\x1Fprivateca.googleapis.com/CaPool\x129projects/{project}/locations/{location}/caPools/{ca_pool}\xEAAw\x0A(compute.googleapis.com/ServiceAttachment\x12Kprojects/{project}/regions/{region}/serviceAttachments/{service_attachment}b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BatchCreatePullRequestCommentsRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BatchCreatePullRequestCommentsRequest.php deleted file mode 100644 index 3079601b5521..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BatchCreatePullRequestCommentsRequest.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.securesourcemanager.v1.BatchCreatePullRequestCommentsRequest - */ -class BatchCreatePullRequestCommentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * 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}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * 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 - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.CreatePullRequestCommentRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $requests; - - /** - * @param string $parent 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}` - * Please see {@see SecureSourceManagerClient::pullRequestName()} for help formatting this field. - * @param \Google\Cloud\SecureSourceManager\V1\CreatePullRequestCommentRequest[] $requests 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 - * - * @return \Google\Cloud\SecureSourceManager\V1\BatchCreatePullRequestCommentsRequest - * - * @experimental - */ - public static function build(string $parent, array $requests): self - { - return (new self()) - ->setParent($parent) - ->setRequests($requests); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * 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}` - * @type \Google\Cloud\SecureSourceManager\V1\CreatePullRequestCommentRequest[] $requests - * 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 - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * 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}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * 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}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * 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 - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.CreatePullRequestCommentRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\CreatePullRequestCommentRequest> - */ - public function getRequests() - { - return $this->requests; - } - - /** - * 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 - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.CreatePullRequestCommentRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecureSourceManager\V1\CreatePullRequestCommentRequest[] $var - * @return $this - */ - public function setRequests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\CreatePullRequestCommentRequest::class); - $this->requests = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BatchCreatePullRequestCommentsResponse.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BatchCreatePullRequestCommentsResponse.php deleted file mode 100644 index 3a698f4d30a2..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BatchCreatePullRequestCommentsResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.securesourcemanager.v1.BatchCreatePullRequestCommentsResponse - */ -class BatchCreatePullRequestCommentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of pull request comments created. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comments = 1; - */ - private $pull_request_comments; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecureSourceManager\V1\PullRequestComment[] $pull_request_comments - * The list of pull request comments created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * The list of pull request comments created. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comments = 1; - * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\PullRequestComment> - */ - public function getPullRequestComments() - { - return $this->pull_request_comments; - } - - /** - * The list of pull request comments created. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comments = 1; - * @param \Google\Cloud\SecureSourceManager\V1\PullRequestComment[] $var - * @return $this - */ - public function setPullRequestComments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\PullRequestComment::class); - $this->pull_request_comments = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BranchRule.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BranchRule.php deleted file mode 100644 index a78b823d4027..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BranchRule.php +++ /dev/null @@ -1,658 +0,0 @@ -google.cloud.securesourcemanager.v1.BranchRule - */ -class BranchRule extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. A unique identifier for a BranchRule. The name should be of the - * format: - * `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. Unique identifier of the repository. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - */ - protected $uid = ''; - /** - * Output only. Create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. User annotations. These attributes can only be set and used by - * the user. See https://google.aip.dev/128#annotations for more details such - * as format and size limitations. - * - * Generated from protobuf field map annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $annotations; - /** - * Optional. This checksum is computed by the server based on the value of - * other fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - /** - * Optional. The pattern of the branch that can match to this BranchRule. - * Specified as regex. - * .* for all branches. Examples: main, (main|release.*). - * Current MVP phase only support `.*` for wildcard. - * - * Generated from protobuf field string include_pattern = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $include_pattern = ''; - /** - * Optional. Determines if the branch rule is disabled or not. - * - * Generated from protobuf field bool disabled = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disabled = false; - /** - * Optional. Determines if the branch rule requires a pull request or not. - * - * Generated from protobuf field bool require_pull_request = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $require_pull_request = false; - /** - * Optional. The minimum number of reviews required for the branch rule to be - * matched. - * - * Generated from protobuf field int32 minimum_reviews_count = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $minimum_reviews_count = 0; - /** - * Optional. The minimum number of approvals required for the branch rule to - * be matched. - * - * Generated from protobuf field int32 minimum_approvals_count = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $minimum_approvals_count = 0; - /** - * Optional. Determines if code owners must approve before merging to the - * branch. - * - * Generated from protobuf field bool require_code_owner_approval = 16 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $require_code_owner_approval = false; - /** - * Optional. Determines if require comments resolved before merging to the - * branch. - * - * Generated from protobuf field bool require_comments_resolved = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $require_comments_resolved = false; - /** - * Optional. Determines if allow stale reviews or approvals before merging to - * the branch. - * - * Generated from protobuf field bool allow_stale_reviews = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $allow_stale_reviews = false; - /** - * Optional. Determines if require linear history before merging to the - * branch. - * - * Generated from protobuf field bool require_linear_history = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $require_linear_history = false; - /** - * Optional. List of required status checks before merging to the branch. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.BranchRule.Check required_status_checks = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $required_status_checks; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. A unique identifier for a BranchRule. The name should be of the - * format: - * `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}` - * @type string $uid - * Output only. Unique identifier of the repository. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Create timestamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Update timestamp. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Optional. User annotations. These attributes can only be set and used by - * the user. See https://google.aip.dev/128#annotations for more details such - * as format and size limitations. - * @type string $etag - * Optional. This checksum is computed by the server based on the value of - * other fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * @type string $include_pattern - * Optional. The pattern of the branch that can match to this BranchRule. - * Specified as regex. - * .* for all branches. Examples: main, (main|release.*). - * Current MVP phase only support `.*` for wildcard. - * @type bool $disabled - * Optional. Determines if the branch rule is disabled or not. - * @type bool $require_pull_request - * Optional. Determines if the branch rule requires a pull request or not. - * @type int $minimum_reviews_count - * Optional. The minimum number of reviews required for the branch rule to be - * matched. - * @type int $minimum_approvals_count - * Optional. The minimum number of approvals required for the branch rule to - * be matched. - * @type bool $require_code_owner_approval - * Optional. Determines if code owners must approve before merging to the - * branch. - * @type bool $require_comments_resolved - * Optional. Determines if require comments resolved before merging to the - * branch. - * @type bool $allow_stale_reviews - * Optional. Determines if allow stale reviews or approvals before merging to - * the branch. - * @type bool $require_linear_history - * Optional. Determines if require linear history before merging to the - * branch. - * @type \Google\Cloud\SecureSourceManager\V1\BranchRule\Check[] $required_status_checks - * Optional. List of required status checks before merging to the branch. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. A unique identifier for a BranchRule. The name should be of the - * format: - * `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. A unique identifier for a BranchRule. The name should be of the - * format: - * `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Unique identifier of the repository. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Unique identifier of the repository. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. Create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. Update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. User annotations. These attributes can only be set and used by - * the user. See https://google.aip.dev/128#annotations for more details such - * as format and size limitations. - * - * Generated from protobuf field map annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Optional. User annotations. These attributes can only be set and used by - * the user. See https://google.aip.dev/128#annotations for more details such - * as format and size limitations. - * - * Generated from protobuf field map annotations = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * Optional. This checksum is computed by the server based on the value of - * other fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. This checksum is computed by the server based on the value of - * other fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Optional. The pattern of the branch that can match to this BranchRule. - * Specified as regex. - * .* for all branches. Examples: main, (main|release.*). - * Current MVP phase only support `.*` for wildcard. - * - * Generated from protobuf field string include_pattern = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getIncludePattern() - { - return $this->include_pattern; - } - - /** - * Optional. The pattern of the branch that can match to this BranchRule. - * Specified as regex. - * .* for all branches. Examples: main, (main|release.*). - * Current MVP phase only support `.*` for wildcard. - * - * Generated from protobuf field string include_pattern = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setIncludePattern($var) - { - GPBUtil::checkString($var, True); - $this->include_pattern = $var; - - return $this; - } - - /** - * Optional. Determines if the branch rule is disabled or not. - * - * Generated from protobuf field bool disabled = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDisabled() - { - return $this->disabled; - } - - /** - * Optional. Determines if the branch rule is disabled or not. - * - * Generated from protobuf field bool disabled = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDisabled($var) - { - GPBUtil::checkBool($var); - $this->disabled = $var; - - return $this; - } - - /** - * Optional. Determines if the branch rule requires a pull request or not. - * - * Generated from protobuf field bool require_pull_request = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getRequirePullRequest() - { - return $this->require_pull_request; - } - - /** - * Optional. Determines if the branch rule requires a pull request or not. - * - * Generated from protobuf field bool require_pull_request = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setRequirePullRequest($var) - { - GPBUtil::checkBool($var); - $this->require_pull_request = $var; - - return $this; - } - - /** - * Optional. The minimum number of reviews required for the branch rule to be - * matched. - * - * Generated from protobuf field int32 minimum_reviews_count = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMinimumReviewsCount() - { - return $this->minimum_reviews_count; - } - - /** - * Optional. The minimum number of reviews required for the branch rule to be - * matched. - * - * Generated from protobuf field int32 minimum_reviews_count = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMinimumReviewsCount($var) - { - GPBUtil::checkInt32($var); - $this->minimum_reviews_count = $var; - - return $this; - } - - /** - * Optional. The minimum number of approvals required for the branch rule to - * be matched. - * - * Generated from protobuf field int32 minimum_approvals_count = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMinimumApprovalsCount() - { - return $this->minimum_approvals_count; - } - - /** - * Optional. The minimum number of approvals required for the branch rule to - * be matched. - * - * Generated from protobuf field int32 minimum_approvals_count = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMinimumApprovalsCount($var) - { - GPBUtil::checkInt32($var); - $this->minimum_approvals_count = $var; - - return $this; - } - - /** - * Optional. Determines if code owners must approve before merging to the - * branch. - * - * Generated from protobuf field bool require_code_owner_approval = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getRequireCodeOwnerApproval() - { - return $this->require_code_owner_approval; - } - - /** - * Optional. Determines if code owners must approve before merging to the - * branch. - * - * Generated from protobuf field bool require_code_owner_approval = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setRequireCodeOwnerApproval($var) - { - GPBUtil::checkBool($var); - $this->require_code_owner_approval = $var; - - return $this; - } - - /** - * Optional. Determines if require comments resolved before merging to the - * branch. - * - * Generated from protobuf field bool require_comments_resolved = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getRequireCommentsResolved() - { - return $this->require_comments_resolved; - } - - /** - * Optional. Determines if require comments resolved before merging to the - * branch. - * - * Generated from protobuf field bool require_comments_resolved = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setRequireCommentsResolved($var) - { - GPBUtil::checkBool($var); - $this->require_comments_resolved = $var; - - return $this; - } - - /** - * Optional. Determines if allow stale reviews or approvals before merging to - * the branch. - * - * Generated from protobuf field bool allow_stale_reviews = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAllowStaleReviews() - { - return $this->allow_stale_reviews; - } - - /** - * Optional. Determines if allow stale reviews or approvals before merging to - * the branch. - * - * Generated from protobuf field bool allow_stale_reviews = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAllowStaleReviews($var) - { - GPBUtil::checkBool($var); - $this->allow_stale_reviews = $var; - - return $this; - } - - /** - * Optional. Determines if require linear history before merging to the - * branch. - * - * Generated from protobuf field bool require_linear_history = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getRequireLinearHistory() - { - return $this->require_linear_history; - } - - /** - * Optional. Determines if require linear history before merging to the - * branch. - * - * Generated from protobuf field bool require_linear_history = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setRequireLinearHistory($var) - { - GPBUtil::checkBool($var); - $this->require_linear_history = $var; - - return $this; - } - - /** - * Optional. List of required status checks before merging to the branch. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.BranchRule.Check required_status_checks = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\BranchRule\Check> - */ - public function getRequiredStatusChecks() - { - return $this->required_status_checks; - } - - /** - * Optional. List of required status checks before merging to the branch. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.BranchRule.Check required_status_checks = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\SecureSourceManager\V1\BranchRule\Check[] $var - * @return $this - */ - public function setRequiredStatusChecks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\BranchRule\Check::class); - $this->required_status_checks = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BranchRule/Check.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BranchRule/Check.php deleted file mode 100644 index 738976a8d23a..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/BranchRule/Check.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.securesourcemanager.v1.BranchRule.Check - */ -class Check extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The context of the check. - * - * Generated from protobuf field string context = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $context = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $context - * Required. The context of the check. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The context of the check. - * - * Generated from protobuf field string context = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getContext() - { - return $this->context; - } - - /** - * Required. The context of the check. - * - * Generated from protobuf field string context = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setContext($var) - { - GPBUtil::checkString($var, True); - $this->context = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CloseIssueRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CloseIssueRequest.php deleted file mode 100644 index 5d127aa07c4a..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CloseIssueRequest.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.securesourcemanager.v1.CloseIssueRequest - */ -class CloseIssueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the issue to close. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The current etag of the issue. - * If the etag is provided and does not match the current etag of the issue, - * closing will be blocked and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - - /** - * @param string $name Required. Name of the issue to close. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. Please see - * {@see SecureSourceManagerClient::issueName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\CloseIssueRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the issue to close. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. - * @type string $etag - * Optional. The current etag of the issue. - * If the etag is provided and does not match the current etag of the issue, - * closing will be blocked and an ABORTED error will be returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the issue to close. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the issue to close. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The current etag of the issue. - * If the etag is provided and does not match the current etag of the issue, - * closing will be blocked and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. The current etag of the issue. - * If the etag is provided and does not match the current etag of the issue, - * closing will be blocked and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ClosePullRequestRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ClosePullRequestRequest.php deleted file mode 100644 index 380a097096b7..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ClosePullRequestRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.securesourcemanager.v1.ClosePullRequestRequest - */ -class ClosePullRequestRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The pull request to close. - * Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The pull request to close. - * Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - * Please see {@see SecureSourceManagerClient::pullRequestName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\ClosePullRequestRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The pull request to close. - * Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The pull request to close. - * Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The pull request to close. - * Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateBranchRuleRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateBranchRuleRequest.php deleted file mode 100644 index 561ef521d29a..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateBranchRuleRequest.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.securesourcemanager.v1.CreateBranchRuleRequest - */ -class CreateBranchRuleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Generated from protobuf field .google.cloud.securesourcemanager.v1.BranchRule branch_rule = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $branch_rule = null; - /** - * Generated from protobuf field string branch_rule_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $branch_rule_id = ''; - - /** - * @param string $parent Please see {@see SecureSourceManagerClient::repositoryName()} for help formatting this field. - * @param \Google\Cloud\SecureSourceManager\V1\BranchRule $branchRule - * @param string $branchRuleId - * - * @return \Google\Cloud\SecureSourceManager\V1\CreateBranchRuleRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\SecureSourceManager\V1\BranchRule $branchRule, string $branchRuleId): self - { - return (new self()) - ->setParent($parent) - ->setBranchRule($branchRule) - ->setBranchRuleId($branchRuleId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * @type \Google\Cloud\SecureSourceManager\V1\BranchRule $branch_rule - * @type string $branch_rule_id - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.securesourcemanager.v1.BranchRule branch_rule = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecureSourceManager\V1\BranchRule|null - */ - public function getBranchRule() - { - return $this->branch_rule; - } - - public function hasBranchRule() - { - return isset($this->branch_rule); - } - - public function clearBranchRule() - { - unset($this->branch_rule); - } - - /** - * Generated from protobuf field .google.cloud.securesourcemanager.v1.BranchRule branch_rule = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecureSourceManager\V1\BranchRule $var - * @return $this - */ - public function setBranchRule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\BranchRule::class); - $this->branch_rule = $var; - - return $this; - } - - /** - * Generated from protobuf field string branch_rule_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBranchRuleId() - { - return $this->branch_rule_id; - } - - /** - * Generated from protobuf field string branch_rule_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBranchRuleId($var) - { - GPBUtil::checkString($var, True); - $this->branch_rule_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateHookRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateHookRequest.php deleted file mode 100644 index 37f0d1f505b9..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateHookRequest.php +++ /dev/null @@ -1,188 +0,0 @@ -google.cloud.securesourcemanager.v1.CreateHookRequest - */ -class CreateHookRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The repository in which to create the hook. Values are of the - * form - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Hook hook = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $hook = null; - /** - * 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. - * - * Generated from protobuf field string hook_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $hook_id = ''; - - /** - * @param string $parent Required. The repository in which to create the hook. Values are of the - * form - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - * Please see {@see SecureSourceManagerClient::repositoryName()} for help formatting this field. - * @param \Google\Cloud\SecureSourceManager\V1\Hook $hook Required. The resource being created. - * @param string $hookId 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. - * - * @return \Google\Cloud\SecureSourceManager\V1\CreateHookRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\SecureSourceManager\V1\Hook $hook, string $hookId): self - { - return (new self()) - ->setParent($parent) - ->setHook($hook) - ->setHookId($hookId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The repository in which to create the hook. Values are of the - * form - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - * @type \Google\Cloud\SecureSourceManager\V1\Hook $hook - * Required. The resource being created. - * @type string $hook_id - * 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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The repository in which to create the hook. Values are of the - * form - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The repository in which to create the hook. Values are of the - * form - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Hook hook = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecureSourceManager\V1\Hook|null - */ - public function getHook() - { - return $this->hook; - } - - public function hasHook() - { - return isset($this->hook); - } - - public function clearHook() - { - unset($this->hook); - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Hook hook = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecureSourceManager\V1\Hook $var - * @return $this - */ - public function setHook($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\Hook::class); - $this->hook = $var; - - return $this; - } - - /** - * 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. - * - * Generated from protobuf field string hook_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getHookId() - { - return $this->hook_id; - } - - /** - * 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. - * - * Generated from protobuf field string hook_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setHookId($var) - { - GPBUtil::checkString($var, True); - $this->hook_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateInstanceRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateInstanceRequest.php deleted file mode 100644 index a0094b4d8bdf..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateInstanceRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.securesourcemanager.v1.CreateInstanceRequest - */ -class CreateInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. ID of the instance to be created. - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance_id = ''; - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Value for parent. Please see - * {@see SecureSourceManagerClient::locationName()} for help formatting this field. - * @param \Google\Cloud\SecureSourceManager\V1\Instance $instance Required. The resource being created. - * @param string $instanceId Required. ID of the instance to be created. - * - * @return \Google\Cloud\SecureSourceManager\V1\CreateInstanceRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\SecureSourceManager\V1\Instance $instance, string $instanceId): self - { - return (new self()) - ->setParent($parent) - ->setInstance($instance) - ->setInstanceId($instanceId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Value for parent. - * @type string $instance_id - * Required. ID of the instance to be created. - * @type \Google\Cloud\SecureSourceManager\V1\Instance $instance - * Required. The resource being created. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. ID of the instance to be created. - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getInstanceId() - { - return $this->instance_id; - } - - /** - * Required. ID of the instance to be created. - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setInstanceId($var) - { - GPBUtil::checkString($var, True); - $this->instance_id = $var; - - return $this; - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecureSourceManager\V1\Instance|null - */ - public function getInstance() - { - return $this->instance; - } - - public function hasInstance() - { - return isset($this->instance); - } - - public function clearInstance() - { - unset($this->instance); - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecureSourceManager\V1\Instance $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\Instance::class); - $this->instance = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateIssueCommentRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateIssueCommentRequest.php deleted file mode 100644 index daab3eab2604..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateIssueCommentRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.securesourcemanager.v1.CreateIssueCommentRequest - */ -class CreateIssueCommentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The issue in which to create the issue comment. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The issue comment to create. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.IssueComment issue_comment = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $issue_comment = null; - - /** - * @param string $parent Required. The issue in which to create the issue comment. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` - * Please see {@see SecureSourceManagerClient::issueName()} for help formatting this field. - * @param \Google\Cloud\SecureSourceManager\V1\IssueComment $issueComment Required. The issue comment to create. - * - * @return \Google\Cloud\SecureSourceManager\V1\CreateIssueCommentRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\SecureSourceManager\V1\IssueComment $issueComment): self - { - return (new self()) - ->setParent($parent) - ->setIssueComment($issueComment); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The issue in which to create the issue comment. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` - * @type \Google\Cloud\SecureSourceManager\V1\IssueComment $issue_comment - * Required. The issue comment to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The issue in which to create the issue comment. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The issue in which to create the issue comment. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The issue comment to create. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.IssueComment issue_comment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecureSourceManager\V1\IssueComment|null - */ - public function getIssueComment() - { - return $this->issue_comment; - } - - public function hasIssueComment() - { - return isset($this->issue_comment); - } - - public function clearIssueComment() - { - unset($this->issue_comment); - } - - /** - * Required. The issue comment to create. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.IssueComment issue_comment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecureSourceManager\V1\IssueComment $var - * @return $this - */ - public function setIssueComment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\IssueComment::class); - $this->issue_comment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateIssueRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateIssueRequest.php deleted file mode 100644 index 9c9153ccad0c..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateIssueRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.securesourcemanager.v1.CreateIssueRequest - */ -class CreateIssueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The repository in which to create the issue. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The issue to create. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Issue issue = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $issue = null; - - /** - * @param string $parent Required. The repository in which to create the issue. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - * Please see {@see SecureSourceManagerClient::repositoryName()} for help formatting this field. - * @param \Google\Cloud\SecureSourceManager\V1\Issue $issue Required. The issue to create. - * - * @return \Google\Cloud\SecureSourceManager\V1\CreateIssueRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\SecureSourceManager\V1\Issue $issue): self - { - return (new self()) - ->setParent($parent) - ->setIssue($issue); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The repository in which to create the issue. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - * @type \Google\Cloud\SecureSourceManager\V1\Issue $issue - * Required. The issue to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The repository in which to create the issue. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The repository in which to create the issue. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The issue to create. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Issue issue = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecureSourceManager\V1\Issue|null - */ - public function getIssue() - { - return $this->issue; - } - - public function hasIssue() - { - return isset($this->issue); - } - - public function clearIssue() - { - unset($this->issue); - } - - /** - * Required. The issue to create. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Issue issue = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecureSourceManager\V1\Issue $var - * @return $this - */ - public function setIssue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\Issue::class); - $this->issue = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreatePullRequestCommentRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreatePullRequestCommentRequest.php deleted file mode 100644 index 5de02a5b7216..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreatePullRequestCommentRequest.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.securesourcemanager.v1.CreatePullRequestCommentRequest - */ -class CreatePullRequestCommentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * 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}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The pull request comment to create. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comment = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $pull_request_comment = null; - - /** - * @param string $parent 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}` - * Please see {@see SecureSourceManagerClient::pullRequestName()} for help formatting this field. - * @param \Google\Cloud\SecureSourceManager\V1\PullRequestComment $pullRequestComment Required. The pull request comment to create. - * - * @return \Google\Cloud\SecureSourceManager\V1\CreatePullRequestCommentRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\SecureSourceManager\V1\PullRequestComment $pullRequestComment): self - { - return (new self()) - ->setParent($parent) - ->setPullRequestComment($pullRequestComment); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * 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}` - * @type \Google\Cloud\SecureSourceManager\V1\PullRequestComment $pull_request_comment - * Required. The pull request comment to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * 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}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * 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}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The pull request comment to create. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecureSourceManager\V1\PullRequestComment|null - */ - public function getPullRequestComment() - { - return $this->pull_request_comment; - } - - public function hasPullRequestComment() - { - return isset($this->pull_request_comment); - } - - public function clearPullRequestComment() - { - unset($this->pull_request_comment); - } - - /** - * Required. The pull request comment to create. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecureSourceManager\V1\PullRequestComment $var - * @return $this - */ - public function setPullRequestComment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\PullRequestComment::class); - $this->pull_request_comment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreatePullRequestRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreatePullRequestRequest.php deleted file mode 100644 index 7afcaf02ceb2..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreatePullRequestRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.securesourcemanager.v1.CreatePullRequestRequest - */ -class CreatePullRequestRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The repository that the pull request is created from. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The pull request to create. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest pull_request = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $pull_request = null; - - /** - * @param string $parent Required. The repository that the pull request is created from. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - * Please see {@see SecureSourceManagerClient::repositoryName()} for help formatting this field. - * @param \Google\Cloud\SecureSourceManager\V1\PullRequest $pullRequest Required. The pull request to create. - * - * @return \Google\Cloud\SecureSourceManager\V1\CreatePullRequestRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\SecureSourceManager\V1\PullRequest $pullRequest): self - { - return (new self()) - ->setParent($parent) - ->setPullRequest($pullRequest); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The repository that the pull request is created from. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - * @type \Google\Cloud\SecureSourceManager\V1\PullRequest $pull_request - * Required. The pull request to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The repository that the pull request is created from. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The repository that the pull request is created from. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The pull request to create. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest pull_request = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecureSourceManager\V1\PullRequest|null - */ - public function getPullRequest() - { - return $this->pull_request; - } - - public function hasPullRequest() - { - return isset($this->pull_request); - } - - public function clearPullRequest() - { - unset($this->pull_request); - } - - /** - * Required. The pull request to create. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest pull_request = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecureSourceManager\V1\PullRequest $var - * @return $this - */ - public function setPullRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\PullRequest::class); - $this->pull_request = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateRepositoryRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateRepositoryRequest.php deleted file mode 100644 index 30839f8f987d..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/CreateRepositoryRequest.php +++ /dev/null @@ -1,178 +0,0 @@ -google.cloud.securesourcemanager.v1.CreateRepositoryRequest - */ -class CreateRepositoryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project in which to create the repository. Values are of the - * form `projects/{project_number}/locations/{location_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Repository repository = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $repository = null; - /** - * 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]-/. - * - * Generated from protobuf field string repository_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $repository_id = ''; - - /** - * @param string $parent Required. The project in which to create the repository. Values are of the - * form `projects/{project_number}/locations/{location_id}` - * Please see {@see SecureSourceManagerClient::locationName()} for help formatting this field. - * @param \Google\Cloud\SecureSourceManager\V1\Repository $repository Required. The resource being created. - * @param string $repositoryId 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]-/. - * - * @return \Google\Cloud\SecureSourceManager\V1\CreateRepositoryRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\SecureSourceManager\V1\Repository $repository, string $repositoryId): self - { - return (new self()) - ->setParent($parent) - ->setRepository($repository) - ->setRepositoryId($repositoryId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project in which to create the repository. Values are of the - * form `projects/{project_number}/locations/{location_id}` - * @type \Google\Cloud\SecureSourceManager\V1\Repository $repository - * Required. The resource being created. - * @type string $repository_id - * 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]-/. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project in which to create the repository. Values are of the - * form `projects/{project_number}/locations/{location_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project in which to create the repository. Values are of the - * form `projects/{project_number}/locations/{location_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Repository repository = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecureSourceManager\V1\Repository|null - */ - public function getRepository() - { - return $this->repository; - } - - public function hasRepository() - { - return isset($this->repository); - } - - public function clearRepository() - { - unset($this->repository); - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Repository repository = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecureSourceManager\V1\Repository $var - * @return $this - */ - public function setRepository($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\Repository::class); - $this->repository = $var; - - return $this; - } - - /** - * 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]-/. - * - * Generated from protobuf field string repository_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRepositoryId() - { - return $this->repository_id; - } - - /** - * 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]-/. - * - * Generated from protobuf field string repository_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRepositoryId($var) - { - GPBUtil::checkString($var, True); - $this->repository_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteBranchRuleRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteBranchRuleRequest.php deleted file mode 100644 index 8cd06982e13f..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteBranchRuleRequest.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.securesourcemanager.v1.DeleteBranchRuleRequest - */ -class DeleteBranchRuleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. If set to true, and the branch rule is not found, the request - * will succeed but no action will be taken on the server. - * - * Generated from protobuf field bool allow_missing = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $allow_missing = false; - - /** - * @param string $name Please see {@see SecureSourceManagerClient::branchRuleName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\DeleteBranchRuleRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * @type bool $allow_missing - * Optional. If set to true, and the branch rule is not found, the request - * will succeed but no action will be taken on the server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. If set to true, and the branch rule is not found, the request - * will succeed but no action will be taken on the server. - * - * Generated from protobuf field bool allow_missing = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * Optional. If set to true, and the branch rule is not found, the request - * will succeed but no action will be taken on the server. - * - * Generated from protobuf field bool allow_missing = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteHookRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteHookRequest.php deleted file mode 100644 index 5707ceb6c0ed..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteHookRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.securesourcemanager.v1.DeleteHookRequest - */ -class DeleteHookRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the hook to delete. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the hook to delete. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. Please see - * {@see SecureSourceManagerClient::hookName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\DeleteHookRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the hook to delete. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the hook to delete. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the hook to delete. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteInstanceRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteInstanceRequest.php deleted file mode 100644 index b4cd224f4619..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteInstanceRequest.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.securesourcemanager.v1.DeleteInstanceRequest - */ -class DeleteInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - /** - * Optional. If set to true, will force the deletion of the instance. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $force = false; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see SecureSourceManagerClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\DeleteInstanceRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the resource. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $force - * Optional. If set to true, will force the deletion of the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. If set to true, will force the deletion of the instance. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * Optional. If set to true, will force the deletion of the instance. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteIssueCommentRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteIssueCommentRequest.php deleted file mode 100644 index bf0817e8b4a2..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteIssueCommentRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.securesourcemanager.v1.DeleteIssueCommentRequest - */ -class DeleteIssueCommentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * 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}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name 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}`. Please see - * {@see SecureSourceManagerClient::issueCommentName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\DeleteIssueCommentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * 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}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * 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}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * 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}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteIssueRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteIssueRequest.php deleted file mode 100644 index 90509dc22bfa..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteIssueRequest.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.securesourcemanager.v1.DeleteIssueRequest - */ -class DeleteIssueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the issue to delete. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The current etag of the issue. - * If the etag is provided and does not match the current etag of the issue, - * deletion will be blocked and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - - /** - * @param string $name Required. Name of the issue to delete. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. Please see - * {@see SecureSourceManagerClient::issueName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\DeleteIssueRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the issue to delete. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. - * @type string $etag - * Optional. The current etag of the issue. - * If the etag is provided and does not match the current etag of the issue, - * deletion will be blocked and an ABORTED error will be returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the issue to delete. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the issue to delete. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The current etag of the issue. - * If the etag is provided and does not match the current etag of the issue, - * deletion will be blocked and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. The current etag of the issue. - * If the etag is provided and does not match the current etag of the issue, - * deletion will be blocked and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeletePullRequestCommentRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeletePullRequestCommentRequest.php deleted file mode 100644 index 0104dde1039e..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeletePullRequestCommentRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.securesourcemanager.v1.DeletePullRequestCommentRequest - */ -class DeletePullRequestCommentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * 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}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name 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}`. Please see - * {@see SecureSourceManagerClient::pullRequestCommentName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\DeletePullRequestCommentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * 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}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * 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}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * 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}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteRepositoryRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteRepositoryRequest.php deleted file mode 100644 index 7afb629ca645..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/DeleteRepositoryRequest.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.securesourcemanager.v1.DeleteRepositoryRequest - */ -class DeleteRepositoryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the repository to delete. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. If set to true, and the repository is not found, the request will - * succeed but no action will be taken on the server. - * - * Generated from protobuf field bool allow_missing = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $allow_missing = false; - - /** - * @param string $name Required. Name of the repository to delete. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. Please see - * {@see SecureSourceManagerClient::repositoryName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\DeleteRepositoryRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the repository to delete. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. - * @type bool $allow_missing - * Optional. If set to true, and the repository is not found, the request will - * succeed but no action will be taken on the server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the repository to delete. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the repository to delete. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. If set to true, and the repository is not found, the request will - * succeed but no action will be taken on the server. - * - * Generated from protobuf field bool allow_missing = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * Optional. If set to true, and the repository is not found, the request will - * succeed but no action will be taken on the server. - * - * Generated from protobuf field bool allow_missing = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchBlobRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchBlobRequest.php deleted file mode 100644 index 9a3ae623b85b..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchBlobRequest.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.securesourcemanager.v1.FetchBlobRequest - */ -class FetchBlobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. - * Specifies the repository containing the blob. - * - * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $repository = ''; - /** - * Required. The SHA-1 hash of the blob to retrieve. - * - * Generated from protobuf field string sha = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $sha = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $repository - * Required. The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. - * Specifies the repository containing the blob. - * @type string $sha - * Required. The SHA-1 hash of the blob to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. - * Specifies the repository containing the blob. - * - * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getRepository() - { - return $this->repository; - } - - /** - * Required. The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. - * Specifies the repository containing the blob. - * - * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setRepository($var) - { - GPBUtil::checkString($var, True); - $this->repository = $var; - - return $this; - } - - /** - * Required. The SHA-1 hash of the blob to retrieve. - * - * Generated from protobuf field string sha = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSha() - { - return $this->sha; - } - - /** - * Required. The SHA-1 hash of the blob to retrieve. - * - * Generated from protobuf field string sha = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSha($var) - { - GPBUtil::checkString($var, True); - $this->sha = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchBlobResponse.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchBlobResponse.php deleted file mode 100644 index 8f42b13e096a..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchBlobResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.securesourcemanager.v1.FetchBlobResponse - */ -class FetchBlobResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The SHA-1 hash of the blob. - * - * Generated from protobuf field string sha = 1; - */ - protected $sha = ''; - /** - * The content of the blob, encoded as base64. - * - * Generated from protobuf field string content = 2; - */ - protected $content = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $sha - * The SHA-1 hash of the blob. - * @type string $content - * The content of the blob, encoded as base64. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * The SHA-1 hash of the blob. - * - * Generated from protobuf field string sha = 1; - * @return string - */ - public function getSha() - { - return $this->sha; - } - - /** - * The SHA-1 hash of the blob. - * - * Generated from protobuf field string sha = 1; - * @param string $var - * @return $this - */ - public function setSha($var) - { - GPBUtil::checkString($var, True); - $this->sha = $var; - - return $this; - } - - /** - * The content of the blob, encoded as base64. - * - * Generated from protobuf field string content = 2; - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * The content of the blob, encoded as base64. - * - * Generated from protobuf field string content = 2; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, True); - $this->content = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchTreeRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchTreeRequest.php deleted file mode 100644 index 1411234c634c..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchTreeRequest.php +++ /dev/null @@ -1,223 +0,0 @@ -google.cloud.securesourcemanager.v1.FetchTreeRequest - */ -class FetchTreeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. - * Specifies the repository to fetch the tree from. - * - * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $repository = ''; - /** - * Optional. `ref` can be a SHA-1 hash, a branch name, or a tag. Specifies - * which tree to fetch. If not specified, the default branch will be used. - * - * Generated from protobuf field string ref = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ref = ''; - /** - * Optional. If true, include all subfolders and their files in the response. - * If false, only the immediate children are returned. - * - * Generated from protobuf field bool recursive = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $recursive = false; - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, at most 10,000 items will be returned. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $repository - * Required. The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. - * Specifies the repository to fetch the tree from. - * @type string $ref - * Optional. `ref` can be a SHA-1 hash, a branch name, or a tag. Specifies - * which tree to fetch. If not specified, the default branch will be used. - * @type bool $recursive - * Optional. If true, include all subfolders and their files in the response. - * If false, only the immediate children are returned. - * @type int $page_size - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, at most 10,000 items will be returned. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. - * Specifies the repository to fetch the tree from. - * - * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getRepository() - { - return $this->repository; - } - - /** - * Required. The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. - * Specifies the repository to fetch the tree from. - * - * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setRepository($var) - { - GPBUtil::checkString($var, True); - $this->repository = $var; - - return $this; - } - - /** - * Optional. `ref` can be a SHA-1 hash, a branch name, or a tag. Specifies - * which tree to fetch. If not specified, the default branch will be used. - * - * Generated from protobuf field string ref = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRef() - { - return $this->ref; - } - - /** - * Optional. `ref` can be a SHA-1 hash, a branch name, or a tag. Specifies - * which tree to fetch. If not specified, the default branch will be used. - * - * Generated from protobuf field string ref = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRef($var) - { - GPBUtil::checkString($var, True); - $this->ref = $var; - - return $this; - } - - /** - * Optional. If true, include all subfolders and their files in the response. - * If false, only the immediate children are returned. - * - * Generated from protobuf field bool recursive = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getRecursive() - { - return $this->recursive; - } - - /** - * Optional. If true, include all subfolders and their files in the response. - * If false, only the immediate children are returned. - * - * Generated from protobuf field bool recursive = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setRecursive($var) - { - GPBUtil::checkBool($var); - $this->recursive = $var; - - return $this; - } - - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, at most 10,000 items will be returned. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, at most 10,000 items will be returned. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchTreeResponse.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchTreeResponse.php deleted file mode 100644 index 6d5f552e4e51..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FetchTreeResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.securesourcemanager.v1.FetchTreeResponse - */ -class FetchTreeResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of TreeEntry objects. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.TreeEntry tree_entries = 1; - */ - private $tree_entries; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecureSourceManager\V1\TreeEntry[] $tree_entries - * The list of TreeEntry objects. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * The list of TreeEntry objects. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.TreeEntry tree_entries = 1; - * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\TreeEntry> - */ - public function getTreeEntries() - { - return $this->tree_entries; - } - - /** - * The list of TreeEntry objects. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.TreeEntry tree_entries = 1; - * @param \Google\Cloud\SecureSourceManager\V1\TreeEntry[] $var - * @return $this - */ - public function setTreeEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\TreeEntry::class); - $this->tree_entries = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FileDiff.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FileDiff.php deleted file mode 100644 index 6bfd025fd97c..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FileDiff.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.securesourcemanager.v1.FileDiff - */ -class FileDiff extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the file. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The action taken on the file (eg. added, modified, deleted). - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.FileDiff.Action action = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $action = 0; - /** - * Output only. The commit pointing to the file changes. - * - * Generated from protobuf field string sha = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $sha = ''; - /** - * Output only. The git patch containing the file changes. - * - * Generated from protobuf field string patch = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $patch = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of the file. - * @type int $action - * Output only. The action taken on the file (eg. added, modified, deleted). - * @type string $sha - * Output only. The commit pointing to the file changes. - * @type string $patch - * Output only. The git patch containing the file changes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the file. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the file. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The action taken on the file (eg. added, modified, deleted). - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.FileDiff.Action action = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getAction() - { - return $this->action; - } - - /** - * Output only. The action taken on the file (eg. added, modified, deleted). - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.FileDiff.Action action = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setAction($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecureSourceManager\V1\FileDiff\Action::class); - $this->action = $var; - - return $this; - } - - /** - * Output only. The commit pointing to the file changes. - * - * Generated from protobuf field string sha = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSha() - { - return $this->sha; - } - - /** - * Output only. The commit pointing to the file changes. - * - * Generated from protobuf field string sha = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSha($var) - { - GPBUtil::checkString($var, True); - $this->sha = $var; - - return $this; - } - - /** - * Output only. The git patch containing the file changes. - * - * Generated from protobuf field string patch = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPatch() - { - return $this->patch; - } - - /** - * Output only. The git patch containing the file changes. - * - * Generated from protobuf field string patch = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPatch($var) - { - GPBUtil::checkString($var, True); - $this->patch = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FileDiff/Action.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FileDiff/Action.php deleted file mode 100644 index 0c6dc74c2fc9..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/FileDiff/Action.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.securesourcemanager.v1.FileDiff.Action - */ -class Action -{ - /** - * Unspecified. - * - * Generated from protobuf enum ACTION_UNSPECIFIED = 0; - */ - const ACTION_UNSPECIFIED = 0; - /** - * The file was added. - * - * Generated from protobuf enum ADDED = 1; - */ - const ADDED = 1; - /** - * The file was modified. - * - * Generated from protobuf enum MODIFIED = 2; - */ - const MODIFIED = 2; - /** - * The file was deleted. - * - * Generated from protobuf enum DELETED = 3; - */ - const DELETED = 3; - - private static $valueToName = [ - self::ACTION_UNSPECIFIED => 'ACTION_UNSPECIFIED', - self::ADDED => 'ADDED', - self::MODIFIED => 'MODIFIED', - self::DELETED => 'DELETED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetBranchRuleRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetBranchRuleRequest.php deleted file mode 100644 index 850491f2650f..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetBranchRuleRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.securesourcemanager.v1.GetBranchRuleRequest - */ -class GetBranchRuleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the repository to retrieve. - * The format is - * `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the repository to retrieve. - * The format is - * `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`. Please see - * {@see SecureSourceManagerClient::branchRuleName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\GetBranchRuleRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the repository to retrieve. - * The format is - * `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the repository to retrieve. - * The format is - * `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the repository to retrieve. - * The format is - * `projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetHookRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetHookRequest.php deleted file mode 100644 index 1e8fe50045ee..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetHookRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.securesourcemanager.v1.GetHookRequest - */ -class GetHookRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the hook to retrieve. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the hook to retrieve. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. Please see - * {@see SecureSourceManagerClient::hookName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\GetHookRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the hook to retrieve. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the hook to retrieve. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the hook to retrieve. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetInstanceRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetInstanceRequest.php deleted file mode 100644 index 4c2a38ea220c..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetInstanceRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.securesourcemanager.v1.GetInstanceRequest - */ -class GetInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see SecureSourceManagerClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\GetInstanceRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetIssueCommentRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetIssueCommentRequest.php deleted file mode 100644 index a3cb3412980b..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetIssueCommentRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.securesourcemanager.v1.GetIssueCommentRequest - */ -class GetIssueCommentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the issue comment to retrieve. - * The format is - * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}/issueComments/{comment_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the issue comment to retrieve. - * The format is - * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}/issueComments/{comment_id}`. Please see - * {@see SecureSourceManagerClient::issueCommentName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\GetIssueCommentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the issue comment to retrieve. - * The format is - * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}/issueComments/{comment_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the issue comment to retrieve. - * The format is - * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}/issueComments/{comment_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the issue comment to retrieve. - * The format is - * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}/issueComments/{comment_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetIssueRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetIssueRequest.php deleted file mode 100644 index 8725cf159035..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetIssueRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.securesourcemanager.v1.GetIssueRequest - */ -class GetIssueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the issue to retrieve. - * The format is - * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the issue to retrieve. - * The format is - * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}`. Please see - * {@see SecureSourceManagerClient::issueName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\GetIssueRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the issue to retrieve. - * The format is - * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the issue to retrieve. - * The format is - * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the issue to retrieve. - * The format is - * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetPullRequestCommentRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetPullRequestCommentRequest.php deleted file mode 100644 index 0db3479658d6..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetPullRequestCommentRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.securesourcemanager.v1.GetPullRequestCommentRequest - */ -class GetPullRequestCommentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * 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}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name 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}`. Please see - * {@see SecureSourceManagerClient::pullRequestCommentName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\GetPullRequestCommentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * 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}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * 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}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * 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}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetPullRequestRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetPullRequestRequest.php deleted file mode 100644 index 6a3b98624553..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetPullRequestRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.securesourcemanager.v1.GetPullRequestRequest - */ -class GetPullRequestRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the pull request to retrieve. - * The format is - * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the pull request to retrieve. - * The format is - * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}`. Please see - * {@see SecureSourceManagerClient::pullRequestName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\GetPullRequestRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the pull request to retrieve. - * The format is - * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the pull request to retrieve. - * The format is - * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the pull request to retrieve. - * The format is - * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetRepositoryRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetRepositoryRequest.php deleted file mode 100644 index 440bda89768b..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/GetRepositoryRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.securesourcemanager.v1.GetRepositoryRequest - */ -class GetRepositoryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the repository to retrieve. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the repository to retrieve. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. Please see - * {@see SecureSourceManagerClient::repositoryName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\GetRepositoryRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the repository to retrieve. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the repository to retrieve. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the repository to retrieve. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Hook.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Hook.php deleted file mode 100644 index e18abfdb8fda..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Hook.php +++ /dev/null @@ -1,381 +0,0 @@ -google.cloud.securesourcemanager.v1.Hook - */ -class Hook extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. A unique identifier for a Hook. The name should be of the - * format: - * `projects/{project}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Required. The target URI to which the payloads will be delivered. - * - * Generated from protobuf field string target_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $target_uri = ''; - /** - * Optional. Determines if the hook disabled or not. - * Set to true to stop sending traffic. - * - * Generated from protobuf field bool disabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disabled = false; - /** - * Optional. The events that trigger hook on. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Hook.HookEventType events = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $events; - /** - * Output only. Create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. Unique identifier of the hook. - * - * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - */ - protected $uid = ''; - /** - * Optional. The trigger option for push events. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Hook.PushOption push_option = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $push_option = null; - /** - * Optional. The sensitive query string to be appended to the target URI. - * - * Generated from protobuf field string sensitive_query_string = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $sensitive_query_string = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. A unique identifier for a Hook. The name should be of the - * format: - * `projects/{project}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}` - * @type string $target_uri - * Required. The target URI to which the payloads will be delivered. - * @type bool $disabled - * Optional. Determines if the hook disabled or not. - * Set to true to stop sending traffic. - * @type int[] $events - * Optional. The events that trigger hook on. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Create timestamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Update timestamp. - * @type string $uid - * Output only. Unique identifier of the hook. - * @type \Google\Cloud\SecureSourceManager\V1\Hook\PushOption $push_option - * Optional. The trigger option for push events. - * @type string $sensitive_query_string - * Optional. The sensitive query string to be appended to the target URI. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. A unique identifier for a Hook. The name should be of the - * format: - * `projects/{project}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. A unique identifier for a Hook. The name should be of the - * format: - * `projects/{project}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The target URI to which the payloads will be delivered. - * - * Generated from protobuf field string target_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTargetUri() - { - return $this->target_uri; - } - - /** - * Required. The target URI to which the payloads will be delivered. - * - * Generated from protobuf field string target_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTargetUri($var) - { - GPBUtil::checkString($var, True); - $this->target_uri = $var; - - return $this; - } - - /** - * Optional. Determines if the hook disabled or not. - * Set to true to stop sending traffic. - * - * Generated from protobuf field bool disabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDisabled() - { - return $this->disabled; - } - - /** - * Optional. Determines if the hook disabled or not. - * Set to true to stop sending traffic. - * - * Generated from protobuf field bool disabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDisabled($var) - { - GPBUtil::checkBool($var); - $this->disabled = $var; - - return $this; - } - - /** - * Optional. The events that trigger hook on. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Hook.HookEventType events = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField - */ - public function getEvents() - { - return $this->events; - } - - /** - * Optional. The events that trigger hook on. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Hook.HookEventType events = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int[] $var - * @return $this - */ - public function setEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\SecureSourceManager\V1\Hook\HookEventType::class); - $this->events = $arr; - - return $this; - } - - /** - * Output only. Create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. Update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. Unique identifier of the hook. - * - * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Unique identifier of the hook. - * - * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Optional. The trigger option for push events. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Hook.PushOption push_option = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\SecureSourceManager\V1\Hook\PushOption|null - */ - public function getPushOption() - { - return $this->push_option; - } - - public function hasPushOption() - { - return isset($this->push_option); - } - - public function clearPushOption() - { - unset($this->push_option); - } - - /** - * Optional. The trigger option for push events. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Hook.PushOption push_option = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\SecureSourceManager\V1\Hook\PushOption $var - * @return $this - */ - public function setPushOption($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\Hook\PushOption::class); - $this->push_option = $var; - - return $this; - } - - /** - * Optional. The sensitive query string to be appended to the target URI. - * - * Generated from protobuf field string sensitive_query_string = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSensitiveQueryString() - { - return $this->sensitive_query_string; - } - - /** - * Optional. The sensitive query string to be appended to the target URI. - * - * Generated from protobuf field string sensitive_query_string = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSensitiveQueryString($var) - { - GPBUtil::checkString($var, True); - $this->sensitive_query_string = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Hook/HookEventType.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Hook/HookEventType.php deleted file mode 100644 index a805886aa824..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Hook/HookEventType.php +++ /dev/null @@ -1,60 +0,0 @@ -google.cloud.securesourcemanager.v1.Hook.HookEventType - */ -class HookEventType -{ - /** - * Unspecified. - * - * Generated from protobuf enum UNSPECIFIED = 0; - */ - const UNSPECIFIED = 0; - /** - * Push events are triggered when pushing to the repository. - * - * Generated from protobuf enum PUSH = 1; - */ - const PUSH = 1; - /** - * Pull request events are triggered when a pull request is opened, closed, - * reopened, or edited. - * - * Generated from protobuf enum PULL_REQUEST = 2; - */ - const PULL_REQUEST = 2; - - private static $valueToName = [ - self::UNSPECIFIED => 'UNSPECIFIED', - self::PUSH => 'PUSH', - self::PULL_REQUEST => 'PULL_REQUEST', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Hook/PushOption.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Hook/PushOption.php deleted file mode 100644 index 7785a28b0d96..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Hook/PushOption.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.securesourcemanager.v1.Hook.PushOption - */ -class PushOption extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Trigger hook for matching branches only. - * Specified as glob pattern. If empty or *, events for all branches are - * reported. Examples: main, {main,release*}. - * See https://pkg.go.dev/github.com/gobwas/glob documentation. - * - * Generated from protobuf field string branch_filter = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $branch_filter = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $branch_filter - * Optional. Trigger hook for matching branches only. - * Specified as glob pattern. If empty or *, events for all branches are - * reported. Examples: main, {main,release*}. - * See https://pkg.go.dev/github.com/gobwas/glob documentation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Trigger hook for matching branches only. - * Specified as glob pattern. If empty or *, events for all branches are - * reported. Examples: main, {main,release*}. - * See https://pkg.go.dev/github.com/gobwas/glob documentation. - * - * Generated from protobuf field string branch_filter = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getBranchFilter() - { - return $this->branch_filter; - } - - /** - * Optional. Trigger hook for matching branches only. - * Specified as glob pattern. If empty or *, events for all branches are - * reported. Examples: main, {main,release*}. - * See https://pkg.go.dev/github.com/gobwas/glob documentation. - * - * Generated from protobuf field string branch_filter = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setBranchFilter($var) - { - GPBUtil::checkString($var, True); - $this->branch_filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance.php deleted file mode 100644 index a5310a8becd3..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance.php +++ /dev/null @@ -1,483 +0,0 @@ -google.cloud.securesourcemanager.v1.Instance - */ -class Instance extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. A unique identifier for an instance. The name should be of the - * format: - * `projects/{project_number}/locations/{location_id}/instances/{instance_id}` - * `project_number`: Maps to a unique int64 id assigned to each project. - * `location_id`: Refers to the region where the instance will be deployed. - * Since Secure Source Manager is a regional service, it must be one of the - * valid GCP regions. - * `instance_id`: User provided name for the instance, must be unique for a - * project_number and location_id combination. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. Create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Labels as key value pairs. - * Keys and values can contain only lowercase letters, numeric characters, - * underscores, and dashes. - * For more information, see [Requirements for - * labels](https://cloud.google.com/resource-manager/docs/best-practices-labels#label_encoding). - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Private settings for private instance. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.PrivateConfig private_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $private_config = null; - /** - * Output only. Current state of the instance. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. An optional field providing information about the current - * instance state. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.StateNote state_note = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_note = 0; - /** - * Optional. Immutable. Customer-managed encryption key name, in the format - * projects/{@*}locations/{@*}keyRings/{@*}cryptoKeys/*. - * - * Generated from protobuf field string kms_key = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - */ - protected $kms_key = ''; - /** - * Output only. A list of hostnames for this instance. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.HostConfig host_config = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $host_config = null; - /** - * Optional. Configuration for Workforce Identity Federation to support - * third party identity provider. If unset, defaults to the Google OIDC IdP. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.WorkforceIdentityFederationConfig workforce_identity_federation_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $workforce_identity_federation_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. A unique identifier for an instance. The name should be of the - * format: - * `projects/{project_number}/locations/{location_id}/instances/{instance_id}` - * `project_number`: Maps to a unique int64 id assigned to each project. - * `location_id`: Refers to the region where the instance will be deployed. - * Since Secure Source Manager is a regional service, it must be one of the - * valid GCP regions. - * `instance_id`: User provided name for the instance, must be unique for a - * project_number and location_id combination. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Create timestamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Update timestamp. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Labels as key value pairs. - * Keys and values can contain only lowercase letters, numeric characters, - * underscores, and dashes. - * For more information, see [Requirements for - * labels](https://cloud.google.com/resource-manager/docs/best-practices-labels#label_encoding). - * @type \Google\Cloud\SecureSourceManager\V1\Instance\PrivateConfig $private_config - * Optional. Private settings for private instance. - * @type int $state - * Output only. Current state of the instance. - * @type int $state_note - * Output only. An optional field providing information about the current - * instance state. - * @type string $kms_key - * Optional. Immutable. Customer-managed encryption key name, in the format - * projects/{@*}locations/{@*}keyRings/{@*}cryptoKeys/*. - * @type \Google\Cloud\SecureSourceManager\V1\Instance\HostConfig $host_config - * Output only. A list of hostnames for this instance. - * @type \Google\Cloud\SecureSourceManager\V1\Instance\WorkforceIdentityFederationConfig $workforce_identity_federation_config - * Optional. Configuration for Workforce Identity Federation to support - * third party identity provider. If unset, defaults to the Google OIDC IdP. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. A unique identifier for an instance. The name should be of the - * format: - * `projects/{project_number}/locations/{location_id}/instances/{instance_id}` - * `project_number`: Maps to a unique int64 id assigned to each project. - * `location_id`: Refers to the region where the instance will be deployed. - * Since Secure Source Manager is a regional service, it must be one of the - * valid GCP regions. - * `instance_id`: User provided name for the instance, must be unique for a - * project_number and location_id combination. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. A unique identifier for an instance. The name should be of the - * format: - * `projects/{project_number}/locations/{location_id}/instances/{instance_id}` - * `project_number`: Maps to a unique int64 id assigned to each project. - * `location_id`: Refers to the region where the instance will be deployed. - * Since Secure Source Manager is a regional service, it must be one of the - * valid GCP regions. - * `instance_id`: User provided name for the instance, must be unique for a - * project_number and location_id combination. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. Update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. Labels as key value pairs. - * Keys and values can contain only lowercase letters, numeric characters, - * underscores, and dashes. - * For more information, see [Requirements for - * labels](https://cloud.google.com/resource-manager/docs/best-practices-labels#label_encoding). - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Labels as key value pairs. - * Keys and values can contain only lowercase letters, numeric characters, - * underscores, and dashes. - * For more information, see [Requirements for - * labels](https://cloud.google.com/resource-manager/docs/best-practices-labels#label_encoding). - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. Private settings for private instance. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.PrivateConfig private_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\SecureSourceManager\V1\Instance\PrivateConfig|null - */ - public function getPrivateConfig() - { - return $this->private_config; - } - - public function hasPrivateConfig() - { - return isset($this->private_config); - } - - public function clearPrivateConfig() - { - unset($this->private_config); - } - - /** - * Optional. Private settings for private instance. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.PrivateConfig private_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\SecureSourceManager\V1\Instance\PrivateConfig $var - * @return $this - */ - public function setPrivateConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\Instance\PrivateConfig::class); - $this->private_config = $var; - - return $this; - } - - /** - * Output only. Current state of the instance. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the instance. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecureSourceManager\V1\Instance\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. An optional field providing information about the current - * instance state. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.StateNote state_note = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getStateNote() - { - return $this->state_note; - } - - /** - * Output only. An optional field providing information about the current - * instance state. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.StateNote state_note = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setStateNote($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecureSourceManager\V1\Instance\StateNote::class); - $this->state_note = $var; - - return $this; - } - - /** - * Optional. Immutable. Customer-managed encryption key name, in the format - * projects/{@*}locations/{@*}keyRings/{@*}cryptoKeys/*. - * - * Generated from protobuf field string kms_key = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @return string - */ - public function getKmsKey() - { - return $this->kms_key; - } - - /** - * Optional. Immutable. Customer-managed encryption key name, in the format - * projects/{@*}locations/{@*}keyRings/{@*}cryptoKeys/*. - * - * Generated from protobuf field string kms_key = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setKmsKey($var) - { - GPBUtil::checkString($var, True); - $this->kms_key = $var; - - return $this; - } - - /** - * Output only. A list of hostnames for this instance. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.HostConfig host_config = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\SecureSourceManager\V1\Instance\HostConfig|null - */ - public function getHostConfig() - { - return $this->host_config; - } - - public function hasHostConfig() - { - return isset($this->host_config); - } - - public function clearHostConfig() - { - unset($this->host_config); - } - - /** - * Output only. A list of hostnames for this instance. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.HostConfig host_config = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\SecureSourceManager\V1\Instance\HostConfig $var - * @return $this - */ - public function setHostConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\Instance\HostConfig::class); - $this->host_config = $var; - - return $this; - } - - /** - * Optional. Configuration for Workforce Identity Federation to support - * third party identity provider. If unset, defaults to the Google OIDC IdP. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.WorkforceIdentityFederationConfig workforce_identity_federation_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\SecureSourceManager\V1\Instance\WorkforceIdentityFederationConfig|null - */ - public function getWorkforceIdentityFederationConfig() - { - return $this->workforce_identity_federation_config; - } - - public function hasWorkforceIdentityFederationConfig() - { - return isset($this->workforce_identity_federation_config); - } - - public function clearWorkforceIdentityFederationConfig() - { - unset($this->workforce_identity_federation_config); - } - - /** - * Optional. Configuration for Workforce Identity Federation to support - * third party identity provider. If unset, defaults to the Google OIDC IdP. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.WorkforceIdentityFederationConfig workforce_identity_federation_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\SecureSourceManager\V1\Instance\WorkforceIdentityFederationConfig $var - * @return $this - */ - public function setWorkforceIdentityFederationConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\Instance\WorkforceIdentityFederationConfig::class); - $this->workforce_identity_federation_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/HostConfig.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/HostConfig.php deleted file mode 100644 index 8d4f866b4210..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/HostConfig.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.securesourcemanager.v1.Instance.HostConfig - */ -class HostConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. HTML hostname. - * - * Generated from protobuf field string html = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $html = ''; - /** - * Output only. API hostname. - * - * Generated from protobuf field string api = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api = ''; - /** - * Output only. Git HTTP hostname. - * - * Generated from protobuf field string git_http = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $git_http = ''; - /** - * Output only. Git SSH hostname. - * - * Generated from protobuf field string git_ssh = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $git_ssh = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $html - * Output only. HTML hostname. - * @type string $api - * Output only. API hostname. - * @type string $git_http - * Output only. Git HTTP hostname. - * @type string $git_ssh - * Output only. Git SSH hostname. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Output only. HTML hostname. - * - * Generated from protobuf field string html = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getHtml() - { - return $this->html; - } - - /** - * Output only. HTML hostname. - * - * Generated from protobuf field string html = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setHtml($var) - { - GPBUtil::checkString($var, True); - $this->html = $var; - - return $this; - } - - /** - * Output only. API hostname. - * - * Generated from protobuf field string api = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApi() - { - return $this->api; - } - - /** - * Output only. API hostname. - * - * Generated from protobuf field string api = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApi($var) - { - GPBUtil::checkString($var, True); - $this->api = $var; - - return $this; - } - - /** - * Output only. Git HTTP hostname. - * - * Generated from protobuf field string git_http = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getGitHttp() - { - return $this->git_http; - } - - /** - * Output only. Git HTTP hostname. - * - * Generated from protobuf field string git_http = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setGitHttp($var) - { - GPBUtil::checkString($var, True); - $this->git_http = $var; - - return $this; - } - - /** - * Output only. Git SSH hostname. - * - * Generated from protobuf field string git_ssh = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getGitSsh() - { - return $this->git_ssh; - } - - /** - * Output only. Git SSH hostname. - * - * Generated from protobuf field string git_ssh = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setGitSsh($var) - { - GPBUtil::checkString($var, True); - $this->git_ssh = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/PrivateConfig.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/PrivateConfig.php deleted file mode 100644 index d9216a90aa6e..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/PrivateConfig.php +++ /dev/null @@ -1,267 +0,0 @@ -google.cloud.securesourcemanager.v1.Instance.PrivateConfig - */ -class PrivateConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Immutable. Indicate if it's private instance. - * - * Generated from protobuf field bool is_private = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; - */ - protected $is_private = false; - /** - * Optional. Immutable. CA pool resource, resource must in the format of - * `projects/{project}/locations/{location}/caPools/{ca_pool}`. - * - * Generated from protobuf field string ca_pool = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $ca_pool = ''; - /** - * Output only. Service Attachment for HTTP, resource is in the format of - * `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`. - * - * Generated from protobuf field string http_service_attachment = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $http_service_attachment = ''; - /** - * Output only. Service Attachment for SSH, resource is in the format of - * `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`. - * - * Generated from protobuf field string ssh_service_attachment = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $ssh_service_attachment = ''; - /** - * Optional. Additional allowed projects for setting up PSC connections. - * Instance host project is automatically allowed and does not need to be - * included in this list. - * - * Generated from protobuf field repeated string psc_allowed_projects = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $psc_allowed_projects; - /** - * Optional. Custom host config for the instance. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.PrivateConfig.CustomHostConfig custom_host_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $custom_host_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $is_private - * Required. Immutable. Indicate if it's private instance. - * @type string $ca_pool - * Optional. Immutable. CA pool resource, resource must in the format of - * `projects/{project}/locations/{location}/caPools/{ca_pool}`. - * @type string $http_service_attachment - * Output only. Service Attachment for HTTP, resource is in the format of - * `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`. - * @type string $ssh_service_attachment - * Output only. Service Attachment for SSH, resource is in the format of - * `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`. - * @type string[] $psc_allowed_projects - * Optional. Additional allowed projects for setting up PSC connections. - * Instance host project is automatically allowed and does not need to be - * included in this list. - * @type \Google\Cloud\SecureSourceManager\V1\Instance\PrivateConfig\CustomHostConfig $custom_host_config - * Optional. Custom host config for the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Immutable. Indicate if it's private instance. - * - * Generated from protobuf field bool is_private = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; - * @return bool - */ - public function getIsPrivate() - { - return $this->is_private; - } - - /** - * Required. Immutable. Indicate if it's private instance. - * - * Generated from protobuf field bool is_private = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; - * @param bool $var - * @return $this - */ - public function setIsPrivate($var) - { - GPBUtil::checkBool($var); - $this->is_private = $var; - - return $this; - } - - /** - * Optional. Immutable. CA pool resource, resource must in the format of - * `projects/{project}/locations/{location}/caPools/{ca_pool}`. - * - * Generated from protobuf field string ca_pool = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getCaPool() - { - return $this->ca_pool; - } - - /** - * Optional. Immutable. CA pool resource, resource must in the format of - * `projects/{project}/locations/{location}/caPools/{ca_pool}`. - * - * Generated from protobuf field string ca_pool = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCaPool($var) - { - GPBUtil::checkString($var, True); - $this->ca_pool = $var; - - return $this; - } - - /** - * Output only. Service Attachment for HTTP, resource is in the format of - * `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`. - * - * Generated from protobuf field string http_service_attachment = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getHttpServiceAttachment() - { - return $this->http_service_attachment; - } - - /** - * Output only. Service Attachment for HTTP, resource is in the format of - * `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`. - * - * Generated from protobuf field string http_service_attachment = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setHttpServiceAttachment($var) - { - GPBUtil::checkString($var, True); - $this->http_service_attachment = $var; - - return $this; - } - - /** - * Output only. Service Attachment for SSH, resource is in the format of - * `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`. - * - * Generated from protobuf field string ssh_service_attachment = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getSshServiceAttachment() - { - return $this->ssh_service_attachment; - } - - /** - * Output only. Service Attachment for SSH, resource is in the format of - * `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`. - * - * Generated from protobuf field string ssh_service_attachment = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSshServiceAttachment($var) - { - GPBUtil::checkString($var, True); - $this->ssh_service_attachment = $var; - - return $this; - } - - /** - * Optional. Additional allowed projects for setting up PSC connections. - * Instance host project is automatically allowed and does not need to be - * included in this list. - * - * Generated from protobuf field repeated string psc_allowed_projects = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField - */ - public function getPscAllowedProjects() - { - return $this->psc_allowed_projects; - } - - /** - * Optional. Additional allowed projects for setting up PSC connections. - * Instance host project is automatically allowed and does not need to be - * included in this list. - * - * Generated from protobuf field repeated string psc_allowed_projects = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string[] $var - * @return $this - */ - public function setPscAllowedProjects($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->psc_allowed_projects = $arr; - - return $this; - } - - /** - * Optional. Custom host config for the instance. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.PrivateConfig.CustomHostConfig custom_host_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\SecureSourceManager\V1\Instance\PrivateConfig\CustomHostConfig|null - */ - public function getCustomHostConfig() - { - return $this->custom_host_config; - } - - public function hasCustomHostConfig() - { - return isset($this->custom_host_config); - } - - public function clearCustomHostConfig() - { - unset($this->custom_host_config); - } - - /** - * Optional. Custom host config for the instance. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Instance.PrivateConfig.CustomHostConfig custom_host_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\SecureSourceManager\V1\Instance\PrivateConfig\CustomHostConfig $var - * @return $this - */ - public function setCustomHostConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\Instance\PrivateConfig\CustomHostConfig::class); - $this->custom_host_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/State.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/State.php deleted file mode 100644 index c78241e4663c..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/State.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.securesourcemanager.v1.Instance.State - */ -class State -{ - /** - * Not set. This should only be the case for incoming requests. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Instance is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * Instance is ready. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * Instance is being deleted. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * Instance is paused. - * - * Generated from protobuf enum PAUSED = 4; - */ - const PAUSED = 4; - /** - * Instance is unknown, we are not sure if it's functioning. - * - * Generated from protobuf enum UNKNOWN = 6; - */ - const UNKNOWN = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::ACTIVE => 'ACTIVE', - self::DELETING => 'DELETING', - self::PAUSED => 'PAUSED', - self::UNKNOWN => 'UNKNOWN', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/StateNote.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/StateNote.php deleted file mode 100644 index 9dc35163e364..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/StateNote.php +++ /dev/null @@ -1,62 +0,0 @@ -google.cloud.securesourcemanager.v1.Instance.StateNote - */ -class StateNote -{ - /** - * STATE_NOTE_UNSPECIFIED as the first value of State. - * - * Generated from protobuf enum STATE_NOTE_UNSPECIFIED = 0; - */ - const STATE_NOTE_UNSPECIFIED = 0; - /** - * CMEK access is unavailable. - * - * Generated from protobuf enum PAUSED_CMEK_UNAVAILABLE = 1; - */ - const PAUSED_CMEK_UNAVAILABLE = 1; - /** - * INSTANCE_RESUMING indicates that the instance was previously paused - * and is under the process of being brought back. - * - * Generated from protobuf enum INSTANCE_RESUMING = 2 [deprecated = true]; - */ - const INSTANCE_RESUMING = 2; - - private static $valueToName = [ - self::STATE_NOTE_UNSPECIFIED => 'STATE_NOTE_UNSPECIFIED', - self::PAUSED_CMEK_UNAVAILABLE => 'PAUSED_CMEK_UNAVAILABLE', - self::INSTANCE_RESUMING => 'INSTANCE_RESUMING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/WorkforceIdentityFederationConfig.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/WorkforceIdentityFederationConfig.php deleted file mode 100644 index 9599626dea4c..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Instance/WorkforceIdentityFederationConfig.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.securesourcemanager.v1.Instance.WorkforceIdentityFederationConfig - */ -class WorkforceIdentityFederationConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Immutable. Whether Workforce Identity Federation is enabled. - * - * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - */ - protected $enabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enabled - * Optional. Immutable. Whether Workforce Identity Federation is enabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Immutable. Whether Workforce Identity Federation is enabled. - * - * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Optional. Immutable. Whether Workforce Identity Federation is enabled. - * - * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Issue.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Issue.php deleted file mode 100644 index 4d9871c1c1c3..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Issue.php +++ /dev/null @@ -1,351 +0,0 @@ -google.cloud.securesourcemanager.v1.Issue - */ -class Issue extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Unique identifier for an issue. The issue id is generated by - * the server. Format: - * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Required. Issue title. - * - * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $title = ''; - /** - * Optional. Issue body. Provides a detailed description of the issue. - * - * Generated from protobuf field string body = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $body = ''; - /** - * Output only. State of the issue. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Issue.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Creation timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Last updated timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. Close timestamp (if closed). Cleared when is re-opened. - * - * Generated from protobuf field .google.protobuf.Timestamp close_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $close_time = null; - /** - * Optional. This checksum is computed by the server based on the value of - * other fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Unique identifier for an issue. The issue id is generated by - * the server. Format: - * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}` - * @type string $title - * Required. Issue title. - * @type string $body - * Optional. Issue body. Provides a detailed description of the issue. - * @type int $state - * Output only. State of the issue. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation timestamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Last updated timestamp. - * @type \Google\Protobuf\Timestamp $close_time - * Output only. Close timestamp (if closed). Cleared when is re-opened. - * @type string $etag - * Optional. This checksum is computed by the server based on the value of - * other fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Unique identifier for an issue. The issue id is generated by - * the server. Format: - * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Unique identifier for an issue. The issue id is generated by - * the server. Format: - * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Issue title. - * - * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * Required. Issue title. - * - * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTitle($var) - { - GPBUtil::checkString($var, True); - $this->title = $var; - - return $this; - } - - /** - * Optional. Issue body. Provides a detailed description of the issue. - * - * Generated from protobuf field string body = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getBody() - { - return $this->body; - } - - /** - * Optional. Issue body. Provides a detailed description of the issue. - * - * Generated from protobuf field string body = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkString($var, True); - $this->body = $var; - - return $this; - } - - /** - * Output only. State of the issue. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Issue.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the issue. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Issue.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecureSourceManager\V1\Issue\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Creation timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Creation timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Last updated timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. Last updated timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. Close timestamp (if closed). Cleared when is re-opened. - * - * Generated from protobuf field .google.protobuf.Timestamp close_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCloseTime() - { - return $this->close_time; - } - - public function hasCloseTime() - { - return isset($this->close_time); - } - - public function clearCloseTime() - { - unset($this->close_time); - } - - /** - * Output only. Close timestamp (if closed). Cleared when is re-opened. - * - * Generated from protobuf field .google.protobuf.Timestamp close_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCloseTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->close_time = $var; - - return $this; - } - - /** - * Optional. This checksum is computed by the server based on the value of - * other fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. This checksum is computed by the server based on the value of - * other fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Issue/State.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Issue/State.php deleted file mode 100644 index c63ef08ebc11..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Issue/State.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.securesourcemanager.v1.Issue.State - */ -class State -{ - /** - * Unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * An open issue. - * - * Generated from protobuf enum OPEN = 1; - */ - const OPEN = 1; - /** - * A closed issue. - * - * Generated from protobuf enum CLOSED = 2; - */ - const CLOSED = 2; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::OPEN => 'OPEN', - self::CLOSED => 'CLOSED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/IssueComment.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/IssueComment.php deleted file mode 100644 index be3d594d0d32..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/IssueComment.php +++ /dev/null @@ -1,197 +0,0 @@ -google.cloud.securesourcemanager.v1.IssueComment - */ -class IssueComment extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Unique identifier for an issue comment. The comment id is - * generated by the server. Format: - * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue}/issueComments/{comment_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Required. The comment body. - * - * Generated from protobuf field string body = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $body = ''; - /** - * Output only. Creation timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Last updated timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Unique identifier for an issue comment. The comment id is - * generated by the server. Format: - * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue}/issueComments/{comment_id}` - * @type string $body - * Required. The comment body. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation timestamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Last updated timestamp. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Unique identifier for an issue comment. The comment id is - * generated by the server. Format: - * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue}/issueComments/{comment_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Unique identifier for an issue comment. The comment id is - * generated by the server. Format: - * `projects/{project}/locations/{location}/repositories/{repository}/issues/{issue}/issueComments/{comment_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The comment body. - * - * Generated from protobuf field string body = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBody() - { - return $this->body; - } - - /** - * Required. The comment body. - * - * Generated from protobuf field string body = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkString($var, True); - $this->body = $var; - - return $this; - } - - /** - * Output only. Creation timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Creation timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Last updated timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. Last updated timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListBranchRulesRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListBranchRulesRequest.php deleted file mode 100644 index 3134c3294373..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListBranchRulesRequest.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.securesourcemanager.v1.ListBranchRulesRequest - */ -class ListBranchRulesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Please see {@see SecureSourceManagerClient::repositoryName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\ListBranchRulesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * @type int $page_size - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListBranchRulesResponse.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListBranchRulesResponse.php deleted file mode 100644 index b8209ec0ade4..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListBranchRulesResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.securesourcemanager.v1.ListBranchRulesResponse - */ -class ListBranchRulesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of branch rules. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.BranchRule branch_rules = 1; - */ - private $branch_rules; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecureSourceManager\V1\BranchRule[] $branch_rules - * The list of branch rules. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * The list of branch rules. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.BranchRule branch_rules = 1; - * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\BranchRule> - */ - public function getBranchRules() - { - return $this->branch_rules; - } - - /** - * The list of branch rules. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.BranchRule branch_rules = 1; - * @param \Google\Cloud\SecureSourceManager\V1\BranchRule[] $var - * @return $this - */ - public function setBranchRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\BranchRule::class); - $this->branch_rules = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListHooksRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListHooksRequest.php deleted file mode 100644 index 51871952979b..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListHooksRequest.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.securesourcemanager.v1.ListHooksRequest - */ -class ListHooksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListHooksRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Parent value for ListHooksRequest. Please see - * {@see SecureSourceManagerClient::repositoryName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\ListHooksRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent value for ListHooksRequest. - * @type int $page_size - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListHooksRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for ListHooksRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListHooksResponse.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListHooksResponse.php deleted file mode 100644 index f4ba071ea96b..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListHooksResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.securesourcemanager.v1.ListHooksResponse - */ -class ListHooksResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of hooks. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Hook hooks = 1; - */ - private $hooks; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecureSourceManager\V1\Hook[] $hooks - * The list of hooks. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * The list of hooks. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Hook hooks = 1; - * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\Hook> - */ - public function getHooks() - { - return $this->hooks; - } - - /** - * The list of hooks. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Hook hooks = 1; - * @param \Google\Cloud\SecureSourceManager\V1\Hook[] $var - * @return $this - */ - public function setHooks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\Hook::class); - $this->hooks = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListInstancesRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListInstancesRequest.php deleted file mode 100644 index 8b5a8d678aef..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListInstancesRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.securesourcemanager.v1.ListInstancesRequest - */ -class ListInstancesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListInstancesRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filter for filtering results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. Parent value for ListInstancesRequest. Please see - * {@see SecureSourceManagerClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\ListInstancesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent value for ListInstancesRequest. - * @type int $page_size - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * @type string $filter - * Optional. Filter for filtering results. - * @type string $order_by - * Optional. Hint for how to order the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListInstancesRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for ListInstancesRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Filter for filtering results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter for filtering results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListInstancesResponse.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListInstancesResponse.php deleted file mode 100644 index e8431ad87303..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListInstancesResponse.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.securesourcemanager.v1.ListInstancesResponse - */ -class ListInstancesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of instances. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Instance instances = 1; - */ - private $instances; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecureSourceManager\V1\Instance[] $instances - * The list of instances. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type string[] $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * The list of instances. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Instance instances = 1; - * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\Instance> - */ - public function getInstances() - { - return $this->instances; - } - - /** - * The list of instances. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Instance instances = 1; - * @param \Google\Cloud\SecureSourceManager\V1\Instance[] $var - * @return $this - */ - public function setInstances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\Instance::class); - $this->instances = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param string[] $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssueCommentsRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssueCommentsRequest.php deleted file mode 100644 index 94df9bc21333..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssueCommentsRequest.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.securesourcemanager.v1.ListIssueCommentsRequest - */ -class ListIssueCommentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The issue in which to list the comments. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The issue in which to list the comments. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` - * Please see {@see SecureSourceManagerClient::issueName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\ListIssueCommentsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The issue in which to list the comments. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` - * @type int $page_size - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The issue in which to list the comments. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The issue in which to list the comments. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssueCommentsResponse.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssueCommentsResponse.php deleted file mode 100644 index 92abc39dbb4b..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssueCommentsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.securesourcemanager.v1.ListIssueCommentsResponse - */ -class ListIssueCommentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of issue comments. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.IssueComment issue_comments = 1; - */ - private $issue_comments; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecureSourceManager\V1\IssueComment[] $issue_comments - * The list of issue comments. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * The list of issue comments. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.IssueComment issue_comments = 1; - * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\IssueComment> - */ - public function getIssueComments() - { - return $this->issue_comments; - } - - /** - * The list of issue comments. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.IssueComment issue_comments = 1; - * @param \Google\Cloud\SecureSourceManager\V1\IssueComment[] $var - * @return $this - */ - public function setIssueComments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\IssueComment::class); - $this->issue_comments = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssuesRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssuesRequest.php deleted file mode 100644 index a8ac09ebc1b9..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssuesRequest.php +++ /dev/null @@ -1,192 +0,0 @@ -google.cloud.securesourcemanager.v1.ListIssuesRequest - */ -class ListIssuesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The repository in which to list issues. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Used to filter the resulting issues list. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The repository in which to list issues. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - * Please see {@see SecureSourceManagerClient::repositoryName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\ListIssuesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The repository in which to list issues. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - * @type int $page_size - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * @type string $filter - * Optional. Used to filter the resulting issues list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The repository in which to list issues. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The repository in which to list issues. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Used to filter the resulting issues list. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Used to filter the resulting issues list. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssuesResponse.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssuesResponse.php deleted file mode 100644 index b81d84e81f67..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListIssuesResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.securesourcemanager.v1.ListIssuesResponse - */ -class ListIssuesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of issues. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Issue issues = 1; - */ - private $issues; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecureSourceManager\V1\Issue[] $issues - * The list of issues. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * The list of issues. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Issue issues = 1; - * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\Issue> - */ - public function getIssues() - { - return $this->issues; - } - - /** - * The list of issues. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Issue issues = 1; - * @param \Google\Cloud\SecureSourceManager\V1\Issue[] $var - * @return $this - */ - public function setIssues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\Issue::class); - $this->issues = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestCommentsRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestCommentsRequest.php deleted file mode 100644 index af4de23807bc..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestCommentsRequest.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.securesourcemanager.v1.ListPullRequestCommentsRequest - */ -class ListPullRequestCommentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * 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}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent 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}` - * Please see {@see SecureSourceManagerClient::pullRequestName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\ListPullRequestCommentsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * 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}` - * @type int $page_size - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * 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}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * 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}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestCommentsResponse.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestCommentsResponse.php deleted file mode 100644 index e81e6e83c299..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestCommentsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.securesourcemanager.v1.ListPullRequestCommentsResponse - */ -class ListPullRequestCommentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of pull request comments. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comments = 1; - */ - private $pull_request_comments; - /** - * A token to set as page_token to retrieve the next page. If this field is - * omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecureSourceManager\V1\PullRequestComment[] $pull_request_comments - * The list of pull request comments. - * @type string $next_page_token - * A token to set as page_token to retrieve the next page. If this field is - * omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * The list of pull request comments. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comments = 1; - * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\PullRequestComment> - */ - public function getPullRequestComments() - { - return $this->pull_request_comments; - } - - /** - * The list of pull request comments. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comments = 1; - * @param \Google\Cloud\SecureSourceManager\V1\PullRequestComment[] $var - * @return $this - */ - public function setPullRequestComments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\PullRequestComment::class); - $this->pull_request_comments = $arr; - - return $this; - } - - /** - * A token to set as page_token to retrieve the next page. If this field is - * omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to set as page_token to retrieve the next page. If this field is - * omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestFileDiffsRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestFileDiffsRequest.php deleted file mode 100644 index 4f3c0ed6584d..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestFileDiffsRequest.php +++ /dev/null @@ -1,164 +0,0 @@ -google.cloud.securesourcemanager.v1.ListPullRequestFileDiffsRequest - */ -class ListPullRequestFileDiffsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The pull request to list file diffs for. - * Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $name Required. The pull request to list file diffs for. - * Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - * Please see {@see SecureSourceManagerClient::pullRequestName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\ListPullRequestFileDiffsRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The pull request to list file diffs for. - * Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - * @type int $page_size - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The pull request to list file diffs for. - * Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The pull request to list file diffs for. - * Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestFileDiffsResponse.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestFileDiffsResponse.php deleted file mode 100644 index 8f2b4a059880..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestFileDiffsResponse.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.securesourcemanager.v1.ListPullRequestFileDiffsResponse - */ -class ListPullRequestFileDiffsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of pull request file diffs. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.FileDiff file_diffs = 1; - */ - private $file_diffs; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecureSourceManager\V1\FileDiff[] $file_diffs - * The list of pull request file diffs. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * The list of pull request file diffs. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.FileDiff file_diffs = 1; - * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\FileDiff> - */ - public function getFileDiffs() - { - return $this->file_diffs; - } - - /** - * The list of pull request file diffs. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.FileDiff file_diffs = 1; - * @param \Google\Cloud\SecureSourceManager\V1\FileDiff[] $var - * @return $this - */ - public function setFileDiffs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\FileDiff::class); - $this->file_diffs = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestsRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestsRequest.php deleted file mode 100644 index 8da23667714b..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestsRequest.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.securesourcemanager.v1.ListPullRequestsRequest - */ -class ListPullRequestsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The repository in which to list pull requests. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The repository in which to list pull requests. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - * Please see {@see SecureSourceManagerClient::repositoryName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\ListPullRequestsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The repository in which to list pull requests. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - * @type int $page_size - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The repository in which to list pull requests. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The repository in which to list pull requests. Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestsResponse.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestsResponse.php deleted file mode 100644 index cf96b0ea3d7c..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListPullRequestsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.securesourcemanager.v1.ListPullRequestsResponse - */ -class ListPullRequestsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of pull requests. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequest pull_requests = 1; - */ - private $pull_requests; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecureSourceManager\V1\PullRequest[] $pull_requests - * The list of pull requests. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * The list of pull requests. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequest pull_requests = 1; - * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\PullRequest> - */ - public function getPullRequests() - { - return $this->pull_requests; - } - - /** - * The list of pull requests. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequest pull_requests = 1; - * @param \Google\Cloud\SecureSourceManager\V1\PullRequest[] $var - * @return $this - */ - public function setPullRequests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\PullRequest::class); - $this->pull_requests = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListRepositoriesRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListRepositoriesRequest.php deleted file mode 100644 index 3fe139d5064c..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListRepositoriesRequest.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.securesourcemanager.v1.ListRepositoriesRequest - */ -class ListRepositoriesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListRepositoriesRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filter results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. The name of the instance in which the repository is hosted, - * formatted as - * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. - * When listing repositories via securesourcemanager.googleapis.com, this - * field is required. When listing repositories via *.sourcemanager.dev, this - * field is ignored. - * - * Generated from protobuf field string instance = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $instance = ''; - - /** - * @param string $parent Required. Parent value for ListRepositoriesRequest. Please see - * {@see SecureSourceManagerClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\ListRepositoriesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent value for ListRepositoriesRequest. - * @type int $page_size - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * @type string $filter - * Optional. Filter results. - * @type string $instance - * Optional. The name of the instance in which the repository is hosted, - * formatted as - * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. - * When listing repositories via securesourcemanager.googleapis.com, this - * field is required. When listing repositories via *.sourcemanager.dev, this - * field is ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListRepositoriesRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for ListRepositoriesRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Requested page size. If unspecified, a default size of 30 will be - * used. The maximum value is 100; values above 100 will be coerced to 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Filter results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. The name of the instance in which the repository is hosted, - * formatted as - * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. - * When listing repositories via securesourcemanager.googleapis.com, this - * field is required. When listing repositories via *.sourcemanager.dev, this - * field is ignored. - * - * Generated from protobuf field string instance = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Optional. The name of the instance in which the repository is hosted, - * formatted as - * `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. - * When listing repositories via securesourcemanager.googleapis.com, this - * field is required. When listing repositories via *.sourcemanager.dev, this - * field is ignored. - * - * Generated from protobuf field string instance = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListRepositoriesResponse.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListRepositoriesResponse.php deleted file mode 100644 index 1cce0311ff54..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ListRepositoriesResponse.php +++ /dev/null @@ -1,99 +0,0 @@ -google.cloud.securesourcemanager.v1.ListRepositoriesResponse - */ -class ListRepositoriesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of repositories. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Repository repositories = 1; - */ - private $repositories; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecureSourceManager\V1\Repository[] $repositories - * The list of repositories. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * The list of repositories. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Repository repositories = 1; - * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\Repository> - */ - public function getRepositories() - { - return $this->repositories; - } - - /** - * The list of repositories. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.Repository repositories = 1; - * @param \Google\Cloud\SecureSourceManager\V1\Repository[] $var - * @return $this - */ - public function setRepositories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\Repository::class); - $this->repositories = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/MergePullRequestRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/MergePullRequestRequest.php deleted file mode 100644 index d41da276f3c7..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/MergePullRequestRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.securesourcemanager.v1.MergePullRequestRequest - */ -class MergePullRequestRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The pull request to merge. - * Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The pull request to merge. - * Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - * Please see {@see SecureSourceManagerClient::pullRequestName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\MergePullRequestRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The pull request to merge. - * Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The pull request to merge. - * Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The pull request to merge. - * Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/OpenIssueRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/OpenIssueRequest.php deleted file mode 100644 index 57cb475ee6dc..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/OpenIssueRequest.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.securesourcemanager.v1.OpenIssueRequest - */ -class OpenIssueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the issue to open. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The current etag of the issue. - * If the etag is provided and does not match the current etag of the issue, - * opening will be blocked and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - - /** - * @param string $name Required. Name of the issue to open. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. Please see - * {@see SecureSourceManagerClient::issueName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\OpenIssueRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the issue to open. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. - * @type string $etag - * Optional. The current etag of the issue. - * If the etag is provided and does not match the current etag of the issue, - * opening will be blocked and an ABORTED error will be returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the issue to open. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the issue to open. - * The format is - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/issues/{issue_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The current etag of the issue. - * If the etag is provided and does not match the current etag of the issue, - * opening will be blocked and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. The current etag of the issue. - * If the etag is provided and does not match the current etag of the issue, - * opening will be blocked and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/OpenPullRequestRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/OpenPullRequestRequest.php deleted file mode 100644 index 90650941f083..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/OpenPullRequestRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.securesourcemanager.v1.OpenPullRequestRequest - */ -class OpenPullRequestRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The pull request to open. - * Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The pull request to open. - * Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - * Please see {@see SecureSourceManagerClient::pullRequestName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\OpenPullRequestRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The pull request to open. - * Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The pull request to open. - * Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The pull request to open. - * Format: - * `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/OperationMetadata.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/OperationMetadata.php deleted file mode 100644 index 24c91f25ad50..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/OperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.securesourcemanager.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_message = ''; - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][google.longrunning.Operation.error] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the operation finished running. - * @type string $target - * Output only. Server-defined resource path for the target of the operation. - * @type string $verb - * Output only. Name of the verb executed by the operation. - * @type string $status_message - * Output only. Human-readable status of the operation, if any. - * @type bool $requested_cancellation - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][google.longrunning.Operation.error] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * @type string $api_version - * Output only. API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][google.longrunning.Operation.error] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][google.longrunning.Operation.error] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequest.php deleted file mode 100644 index 8f6c0fd4ff36..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequest.php +++ /dev/null @@ -1,406 +0,0 @@ -google.cloud.securesourcemanager.v1.PullRequest - */ -class PullRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Identifier. A unique identifier for a PullRequest. The number - * appended at the end is generated by the server. Format: - * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Required. The pull request title. - * - * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $title = ''; - /** - * Optional. The pull request body. Provides a detailed description of the - * changes. - * - * Generated from protobuf field string body = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $body = ''; - /** - * Required. The branch to merge changes in. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest.Branch base = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $base = null; - /** - * Immutable. The branch containing the changes to be merged. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest.Branch head = 5 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $head = null; - /** - * Output only. State of the pull request (open, closed or merged). - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Creation timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Last updated timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. Close timestamp (if closed or merged). Cleared when pull - * request is re-opened. - * - * Generated from protobuf field .google.protobuf.Timestamp close_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $close_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Identifier. A unique identifier for a PullRequest. The number - * appended at the end is generated by the server. Format: - * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request_id}` - * @type string $title - * Required. The pull request title. - * @type string $body - * Optional. The pull request body. Provides a detailed description of the - * changes. - * @type \Google\Cloud\SecureSourceManager\V1\PullRequest\Branch $base - * Required. The branch to merge changes in. - * @type \Google\Cloud\SecureSourceManager\V1\PullRequest\Branch $head - * Immutable. The branch containing the changes to be merged. - * @type int $state - * Output only. State of the pull request (open, closed or merged). - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation timestamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Last updated timestamp. - * @type \Google\Protobuf\Timestamp $close_time - * Output only. Close timestamp (if closed or merged). Cleared when pull - * request is re-opened. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Identifier. A unique identifier for a PullRequest. The number - * appended at the end is generated by the server. Format: - * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Identifier. A unique identifier for a PullRequest. The number - * appended at the end is generated by the server. Format: - * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The pull request title. - * - * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * Required. The pull request title. - * - * Generated from protobuf field string title = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTitle($var) - { - GPBUtil::checkString($var, True); - $this->title = $var; - - return $this; - } - - /** - * Optional. The pull request body. Provides a detailed description of the - * changes. - * - * Generated from protobuf field string body = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getBody() - { - return $this->body; - } - - /** - * Optional. The pull request body. Provides a detailed description of the - * changes. - * - * Generated from protobuf field string body = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkString($var, True); - $this->body = $var; - - return $this; - } - - /** - * Required. The branch to merge changes in. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest.Branch base = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecureSourceManager\V1\PullRequest\Branch|null - */ - public function getBase() - { - return $this->base; - } - - public function hasBase() - { - return isset($this->base); - } - - public function clearBase() - { - unset($this->base); - } - - /** - * Required. The branch to merge changes in. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest.Branch base = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecureSourceManager\V1\PullRequest\Branch $var - * @return $this - */ - public function setBase($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\PullRequest\Branch::class); - $this->base = $var; - - return $this; - } - - /** - * Immutable. The branch containing the changes to be merged. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest.Branch head = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Cloud\SecureSourceManager\V1\PullRequest\Branch|null - */ - public function getHead() - { - return $this->head; - } - - public function hasHead() - { - return isset($this->head); - } - - public function clearHead() - { - unset($this->head); - } - - /** - * Immutable. The branch containing the changes to be merged. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest.Branch head = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Cloud\SecureSourceManager\V1\PullRequest\Branch $var - * @return $this - */ - public function setHead($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\PullRequest\Branch::class); - $this->head = $var; - - return $this; - } - - /** - * Output only. State of the pull request (open, closed or merged). - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the pull request (open, closed or merged). - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecureSourceManager\V1\PullRequest\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Creation timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Creation timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Last updated timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. Last updated timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. Close timestamp (if closed or merged). Cleared when pull - * request is re-opened. - * - * Generated from protobuf field .google.protobuf.Timestamp close_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCloseTime() - { - return $this->close_time; - } - - public function hasCloseTime() - { - return isset($this->close_time); - } - - public function clearCloseTime() - { - unset($this->close_time); - } - - /** - * Output only. Close timestamp (if closed or merged). Cleared when pull - * request is re-opened. - * - * Generated from protobuf field .google.protobuf.Timestamp close_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCloseTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->close_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequest/Branch.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequest/Branch.php deleted file mode 100644 index f98d640a1d9f..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequest/Branch.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.securesourcemanager.v1.PullRequest.Branch - */ -class Branch extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the branch. - * - * Generated from protobuf field string ref = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ref = ''; - /** - * Output only. The commit at the tip of the branch. - * - * Generated from protobuf field string sha = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $sha = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $ref - * Required. Name of the branch. - * @type string $sha - * Output only. The commit at the tip of the branch. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the branch. - * - * Generated from protobuf field string ref = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRef() - { - return $this->ref; - } - - /** - * Required. Name of the branch. - * - * Generated from protobuf field string ref = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRef($var) - { - GPBUtil::checkString($var, True); - $this->ref = $var; - - return $this; - } - - /** - * Output only. The commit at the tip of the branch. - * - * Generated from protobuf field string sha = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSha() - { - return $this->sha; - } - - /** - * Output only. The commit at the tip of the branch. - * - * Generated from protobuf field string sha = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSha($var) - { - GPBUtil::checkString($var, True); - $this->sha = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequest/State.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequest/State.php deleted file mode 100644 index ff106fbf8132..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequest/State.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.securesourcemanager.v1.PullRequest.State - */ -class State -{ - /** - * Unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * An open pull request. - * - * Generated from protobuf enum OPEN = 1; - */ - const OPEN = 1; - /** - * A closed pull request. - * - * Generated from protobuf enum CLOSED = 2; - */ - const CLOSED = 2; - /** - * A merged pull request. - * - * Generated from protobuf enum MERGED = 3; - */ - const MERGED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::OPEN => 'OPEN', - self::CLOSED => 'CLOSED', - self::MERGED => 'MERGED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment.php deleted file mode 100644 index c0670b6f9f02..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment.php +++ /dev/null @@ -1,271 +0,0 @@ -google.cloud.securesourcemanager.v1.PullRequestComment - */ -class PullRequestComment extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Unique identifier for the pull request comment. The comment id - * is generated by the server. Format: - * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}/pullRequestComments/{comment_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. Creation timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Last updated timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - protected $comment_detail; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Unique identifier for the pull request comment. The comment id - * is generated by the server. Format: - * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}/pullRequestComments/{comment_id}` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation timestamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Last updated timestamp. - * @type \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Review $review - * Optional. The review summary comment. - * @type \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Comment $comment - * Optional. The general pull request comment. - * @type \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Code $code - * Optional. The comment on a code line. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Unique identifier for the pull request comment. The comment id - * is generated by the server. Format: - * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}/pullRequestComments/{comment_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Unique identifier for the pull request comment. The comment id - * is generated by the server. Format: - * `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}/pullRequestComments/{comment_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Creation timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Creation timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Last updated timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. Last updated timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. The review summary comment. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment.Review review = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Review|null - */ - public function getReview() - { - return $this->readOneof(4); - } - - public function hasReview() - { - return $this->hasOneof(4); - } - - /** - * Optional. The review summary comment. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment.Review review = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Review $var - * @return $this - */ - public function setReview($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Review::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Optional. The general pull request comment. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment.Comment comment = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Comment|null - */ - public function getComment() - { - return $this->readOneof(5); - } - - public function hasComment() - { - return $this->hasOneof(5); - } - - /** - * Optional. The general pull request comment. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment.Comment comment = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Comment $var - * @return $this - */ - public function setComment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Comment::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Optional. The comment on a code line. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment.Code code = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Code|null - */ - public function getCode() - { - return $this->readOneof(6); - } - - public function hasCode() - { - return $this->hasOneof(6); - } - - /** - * Optional. The comment on a code line. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment.Code code = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Code $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Code::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getCommentDetail() - { - return $this->whichOneof("comment_detail"); - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Code.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Code.php deleted file mode 100644 index 2d28d2b70b9b..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Code.php +++ /dev/null @@ -1,255 +0,0 @@ -google.cloud.securesourcemanager.v1.PullRequestComment.Code - */ -class Code extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The comment body. - * - * Generated from protobuf field string body = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $body = ''; - /** - * Optional. Input only. The PullRequestComment resource name that this - * comment is replying to. - * - * Generated from protobuf field string reply = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $reply = ''; - /** - * Optional. The position of the comment. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment.Position position = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $position = null; - /** - * Output only. The root comment of the conversation, derived from the reply - * field. - * - * Generated from protobuf field string effective_root_comment = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $effective_root_comment = ''; - /** - * Output only. Boolean indicator if the comment is resolved. - * - * Generated from protobuf field bool resolved = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $resolved = false; - /** - * Output only. The effective commit sha this code comment is pointing to. - * - * Generated from protobuf field string effective_commit_sha = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $effective_commit_sha = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $body - * Required. The comment body. - * @type string $reply - * Optional. Input only. The PullRequestComment resource name that this - * comment is replying to. - * @type \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Position $position - * Optional. The position of the comment. - * @type string $effective_root_comment - * Output only. The root comment of the conversation, derived from the reply - * field. - * @type bool $resolved - * Output only. Boolean indicator if the comment is resolved. - * @type string $effective_commit_sha - * Output only. The effective commit sha this code comment is pointing to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The comment body. - * - * Generated from protobuf field string body = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBody() - { - return $this->body; - } - - /** - * Required. The comment body. - * - * Generated from protobuf field string body = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkString($var, True); - $this->body = $var; - - return $this; - } - - /** - * Optional. Input only. The PullRequestComment resource name that this - * comment is replying to. - * - * Generated from protobuf field string reply = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getReply() - { - return $this->reply; - } - - /** - * Optional. Input only. The PullRequestComment resource name that this - * comment is replying to. - * - * Generated from protobuf field string reply = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setReply($var) - { - GPBUtil::checkString($var, True); - $this->reply = $var; - - return $this; - } - - /** - * Optional. The position of the comment. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment.Position position = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Position|null - */ - public function getPosition() - { - return $this->position; - } - - public function hasPosition() - { - return isset($this->position); - } - - public function clearPosition() - { - unset($this->position); - } - - /** - * Optional. The position of the comment. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment.Position position = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Position $var - * @return $this - */ - public function setPosition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Position::class); - $this->position = $var; - - return $this; - } - - /** - * Output only. The root comment of the conversation, derived from the reply - * field. - * - * Generated from protobuf field string effective_root_comment = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEffectiveRootComment() - { - return $this->effective_root_comment; - } - - /** - * Output only. The root comment of the conversation, derived from the reply - * field. - * - * Generated from protobuf field string effective_root_comment = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEffectiveRootComment($var) - { - GPBUtil::checkString($var, True); - $this->effective_root_comment = $var; - - return $this; - } - - /** - * Output only. Boolean indicator if the comment is resolved. - * - * Generated from protobuf field bool resolved = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getResolved() - { - return $this->resolved; - } - - /** - * Output only. Boolean indicator if the comment is resolved. - * - * Generated from protobuf field bool resolved = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setResolved($var) - { - GPBUtil::checkBool($var); - $this->resolved = $var; - - return $this; - } - - /** - * Output only. The effective commit sha this code comment is pointing to. - * - * Generated from protobuf field string effective_commit_sha = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEffectiveCommitSha() - { - return $this->effective_commit_sha; - } - - /** - * Output only. The effective commit sha this code comment is pointing to. - * - * Generated from protobuf field string effective_commit_sha = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEffectiveCommitSha($var) - { - GPBUtil::checkString($var, True); - $this->effective_commit_sha = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Comment.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Comment.php deleted file mode 100644 index 0f8cb7091c02..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Comment.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.securesourcemanager.v1.PullRequestComment.Comment - */ -class Comment extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The comment body. - * - * Generated from protobuf field string body = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $body = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $body - * Required. The comment body. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The comment body. - * - * Generated from protobuf field string body = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBody() - { - return $this->body; - } - - /** - * Required. The comment body. - * - * Generated from protobuf field string body = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkString($var, True); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Position.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Position.php deleted file mode 100644 index f568286169cd..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Position.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.securesourcemanager.v1.PullRequestComment.Position - */ -class Position extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The path of the file. - * - * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $path = ''; - /** - * Required. The line number of the comment. Positive value means it's on - * the new side of the diff, negative value means it's on the old side. - * - * Generated from protobuf field int64 line = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $line = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $path - * Required. The path of the file. - * @type int|string $line - * Required. The line number of the comment. Positive value means it's on - * the new side of the diff, negative value means it's on the old side. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The path of the file. - * - * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Required. The path of the file. - * - * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - - /** - * Required. The line number of the comment. Positive value means it's on - * the new side of the diff, negative value means it's on the old side. - * - * Generated from protobuf field int64 line = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int|string - */ - public function getLine() - { - return $this->line; - } - - /** - * Required. The line number of the comment. Positive value means it's on - * the new side of the diff, negative value means it's on the old side. - * - * Generated from protobuf field int64 line = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int|string $var - * @return $this - */ - public function setLine($var) - { - GPBUtil::checkInt64($var); - $this->line = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Review.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Review.php deleted file mode 100644 index 08713e27fb10..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Review.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.securesourcemanager.v1.PullRequestComment.Review - */ -class Review extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The review action type. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment.Review.ActionType action_type = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $action_type = 0; - /** - * Optional. The comment body. - * - * Generated from protobuf field string body = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $body = ''; - /** - * Output only. The effective commit sha this review is pointing to. - * - * Generated from protobuf field string effective_commit_sha = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $effective_commit_sha = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $action_type - * Required. The review action type. - * @type string $body - * Optional. The comment body. - * @type string $effective_commit_sha - * Output only. The effective commit sha this review is pointing to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The review action type. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment.Review.ActionType action_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getActionType() - { - return $this->action_type; - } - - /** - * Required. The review action type. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment.Review.ActionType action_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setActionType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecureSourceManager\V1\PullRequestComment\Review\ActionType::class); - $this->action_type = $var; - - return $this; - } - - /** - * Optional. The comment body. - * - * Generated from protobuf field string body = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getBody() - { - return $this->body; - } - - /** - * Optional. The comment body. - * - * Generated from protobuf field string body = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkString($var, True); - $this->body = $var; - - return $this; - } - - /** - * Output only. The effective commit sha this review is pointing to. - * - * Generated from protobuf field string effective_commit_sha = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEffectiveCommitSha() - { - return $this->effective_commit_sha; - } - - /** - * Output only. The effective commit sha this review is pointing to. - * - * Generated from protobuf field string effective_commit_sha = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEffectiveCommitSha($var) - { - GPBUtil::checkString($var, True); - $this->effective_commit_sha = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Review/ActionType.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Review/ActionType.php deleted file mode 100644 index 9a36ea1ca2ec..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/PullRequestComment/Review/ActionType.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.securesourcemanager.v1.PullRequestComment.Review.ActionType - */ -class ActionType -{ - /** - * Unspecified. - * - * Generated from protobuf enum ACTION_TYPE_UNSPECIFIED = 0; - */ - const ACTION_TYPE_UNSPECIFIED = 0; - /** - * A general review comment. - * - * Generated from protobuf enum COMMENT = 1; - */ - const COMMENT = 1; - /** - * Change required from this review. - * - * Generated from protobuf enum CHANGE_REQUESTED = 2; - */ - const CHANGE_REQUESTED = 2; - /** - * Change approved from this review. - * - * Generated from protobuf enum APPROVED = 3; - */ - const APPROVED = 3; - - private static $valueToName = [ - self::ACTION_TYPE_UNSPECIFIED => 'ACTION_TYPE_UNSPECIFIED', - self::COMMENT => 'COMMENT', - self::CHANGE_REQUESTED => 'CHANGE_REQUESTED', - self::APPROVED => 'APPROVED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Repository.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Repository.php deleted file mode 100644 index bad0b241613b..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Repository.php +++ /dev/null @@ -1,419 +0,0 @@ -google.cloud.securesourcemanager.v1.Repository - */ -class Repository extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. A unique identifier for a repository. The name should be of the - * format: - * `projects/{project}/locations/{location_id}/repositories/{repository_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Optional. Description of the repository, which cannot exceed 500 - * characters. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. The name of the instance in which the repository is hosted, - * formatted as - * `projects/{project_number}/locations/{location_id}/instances/{instance_id}` - * When creating repository via securesourcemanager.googleapis.com, this field - * is used as input. When creating repository via *.sourcemanager.dev, this - * field is output only. - * - * Generated from protobuf field string instance = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $instance = ''; - /** - * Output only. Unique identifier of the repository. - * - * Generated from protobuf field string uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - */ - protected $uid = ''; - /** - * Output only. Create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. This checksum is computed by the server based on the value of - * other fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - /** - * Output only. URIs for the repository. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Repository.URIs uris = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uris = null; - /** - * Input only. Initial configurations for the repository. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Repository.InitialConfig initial_config = 10 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $initial_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. A unique identifier for a repository. The name should be of the - * format: - * `projects/{project}/locations/{location_id}/repositories/{repository_id}` - * @type string $description - * Optional. Description of the repository, which cannot exceed 500 - * characters. - * @type string $instance - * Optional. The name of the instance in which the repository is hosted, - * formatted as - * `projects/{project_number}/locations/{location_id}/instances/{instance_id}` - * When creating repository via securesourcemanager.googleapis.com, this field - * is used as input. When creating repository via *.sourcemanager.dev, this - * field is output only. - * @type string $uid - * Output only. Unique identifier of the repository. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Create timestamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Update timestamp. - * @type string $etag - * Optional. This checksum is computed by the server based on the value of - * other fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * @type \Google\Cloud\SecureSourceManager\V1\Repository\URIs $uris - * Output only. URIs for the repository. - * @type \Google\Cloud\SecureSourceManager\V1\Repository\InitialConfig $initial_config - * Input only. Initial configurations for the repository. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. A unique identifier for a repository. The name should be of the - * format: - * `projects/{project}/locations/{location_id}/repositories/{repository_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. A unique identifier for a repository. The name should be of the - * format: - * `projects/{project}/locations/{location_id}/repositories/{repository_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Description of the repository, which cannot exceed 500 - * characters. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the repository, which cannot exceed 500 - * characters. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. The name of the instance in which the repository is hosted, - * formatted as - * `projects/{project_number}/locations/{location_id}/instances/{instance_id}` - * When creating repository via securesourcemanager.googleapis.com, this field - * is used as input. When creating repository via *.sourcemanager.dev, this - * field is output only. - * - * Generated from protobuf field string instance = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Optional. The name of the instance in which the repository is hosted, - * formatted as - * `projects/{project_number}/locations/{location_id}/instances/{instance_id}` - * When creating repository via securesourcemanager.googleapis.com, this field - * is used as input. When creating repository via *.sourcemanager.dev, this - * field is output only. - * - * Generated from protobuf field string instance = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Output only. Unique identifier of the repository. - * - * Generated from protobuf field string uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Unique identifier of the repository. - * - * Generated from protobuf field string uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. Create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. Update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. This checksum is computed by the server based on the value of - * other fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. This checksum is computed by the server based on the value of - * other fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Output only. URIs for the repository. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Repository.URIs uris = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\SecureSourceManager\V1\Repository\URIs|null - */ - public function getUris() - { - return $this->uris; - } - - public function hasUris() - { - return isset($this->uris); - } - - public function clearUris() - { - unset($this->uris); - } - - /** - * Output only. URIs for the repository. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Repository.URIs uris = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\SecureSourceManager\V1\Repository\URIs $var - * @return $this - */ - public function setUris($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\Repository\URIs::class); - $this->uris = $var; - - return $this; - } - - /** - * Input only. Initial configurations for the repository. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Repository.InitialConfig initial_config = 10 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return \Google\Cloud\SecureSourceManager\V1\Repository\InitialConfig|null - */ - public function getInitialConfig() - { - return $this->initial_config; - } - - public function hasInitialConfig() - { - return isset($this->initial_config); - } - - public function clearInitialConfig() - { - unset($this->initial_config); - } - - /** - * Input only. Initial configurations for the repository. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Repository.InitialConfig initial_config = 10 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param \Google\Cloud\SecureSourceManager\V1\Repository\InitialConfig $var - * @return $this - */ - public function setInitialConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\Repository\InitialConfig::class); - $this->initial_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Repository/InitialConfig.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Repository/InitialConfig.php deleted file mode 100644 index ef6e1d6cf7e6..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Repository/InitialConfig.php +++ /dev/null @@ -1,665 +0,0 @@ -google.cloud.securesourcemanager.v1.Repository.InitialConfig - */ -class InitialConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Default branch name of the repository. - * - * Generated from protobuf field string default_branch = 1; - */ - protected $default_branch = ''; - /** - * List of gitignore template names user can choose from. - * Valid values: actionscript, ada, agda, android, - * anjuta, ansible, appcelerator-titanium, app-engine, archives, - * arch-linux-packages, atmel-studio, autotools, backup, bazaar, bazel, - * bitrix, bricx-cc, c, cake-php, calabash, cf-wheels, chef-cookbook, - * clojure, cloud9, c-make, code-igniter, code-kit, code-sniffer, - * common-lisp, composer, concrete5, coq, cordova, cpp, craft-cms, cuda, - * cvs, d, dart, dart-editor, delphi, diff, dm, dreamweaver, dropbox, - * drupal, drupal-7, eagle, eclipse, eiffel-studio, elisp, elixir, elm, - * emacs, ensime, epi-server, erlang, esp-idf, espresso, exercism, - * expression-engine, ext-js, fancy, finale, flex-builder, force-dot-com, - * fortran, fuel-php, gcov, git-book, gnome-shell-extension, go, godot, gpg, - * gradle, grails, gwt, haskell, hugo, iar-ewarm, idris, igor-pro, images, - * infor-cms, java, jboss, jboss-4, jboss-6, jdeveloper, jekyll, - * jenkins-home, jenv, jet-brains, jigsaw, joomla, julia, jupyter-notebooks, - * kate, kdevelop4, kentico, ki-cad, kohana, kotlin, lab-view, laravel, - * lazarus, leiningen, lemon-stand, libre-office, lilypond, linux, lithium, - * logtalk, lua, lyx, mac-os, magento, magento-1, magento-2, matlab, maven, - * mercurial, mercury, metals, meta-programming-system, meteor, - * microsoft-office, model-sim, momentics, mono-develop, nanoc, net-beans, - * nikola, nim, ninja, node, notepad-pp, nwjs, objective--c, ocaml, octave, - * opa, open-cart, openssl, oracle-forms, otto, packer, patch, perl, perl6, - * phalcon, phoenix, pimcore, play-framework, plone, prestashop, processing, - * psoc-creator, puppet, pure-script, putty, python, qooxdoo, qt, r, racket, - * rails, raku, red, redcar, redis, rhodes-rhomobile, ros, ruby, rust, sam, - * sass, sbt, scala, scheme, scons, scrivener, sdcc, seam-gen, sketch-up, - * slick-edit, smalltalk, snap, splunk, stata, stella, sublime-text, - * sugar-crm, svn, swift, symfony, symphony-cms, synopsys-vcs, tags, - * terraform, tex, text-mate, textpattern, think-php, tortoise-git, - * turbo-gears-2, typo3, umbraco, unity, unreal-engine, vagrant, vim, - * virtual-env, virtuoso, visual-studio, visual-studio-code, vue, vvvv, waf, - * web-methods, windows, word-press, xcode, xilinx, xilinx-ise, xojo, - * yeoman, yii, zend-framework, zephir. - * - * Generated from protobuf field repeated string gitignores = 2; - */ - private $gitignores; - /** - * License template name user can choose from. - * Valid values: license-0bsd, license-389-exception, aal, abstyles, - * adobe-2006, adobe-glyph, adsl, afl-1-1, afl-1-2, afl-2-0, afl-2-1, - * afl-3-0, afmparse, agpl-1-0, agpl-1-0-only, agpl-1-0-or-later, - * agpl-3-0-only, agpl-3-0-or-later, aladdin, amdplpa, aml, ampas, antlr-pd, - * antlr-pd-fallback, apache-1-0, apache-1-1, apache-2-0, apafml, apl-1-0, - * apsl-1-0, apsl-1-1, apsl-1-2, apsl-2-0, artistic-1-0, artistic-1-0-cl8, - * artistic-1-0-perl, artistic-2-0, autoconf-exception-2-0, - * autoconf-exception-3-0, bahyph, barr, beerware, bison-exception-2-2, - * bittorrent-1-0, bittorrent-1-1, blessing, blueoak-1-0-0, - * bootloader-exception, borceux, bsd-1-clause, bsd-2-clause, - * bsd-2-clause-freebsd, bsd-2-clause-netbsd, bsd-2-clause-patent, - * bsd-2-clause-views, bsd-3-clause, bsd-3-clause-attribution, - * bsd-3-clause-clear, bsd-3-clause-lbnl, bsd-3-clause-modification, - * bsd-3-clause-no-nuclear-license, bsd-3-clause-no-nuclear-license-2014, - * bsd-3-clause-no-nuclear-warranty, bsd-3-clause-open-mpi, bsd-4-clause, - * bsd-4-clause-shortened, bsd-4-clause-uc, bsd-protection, bsd-source-code, - * bsl-1-0, busl-1-1, cal-1-0, cal-1-0-combined-work-exception, caldera, - * catosl-1-1, cc0-1-0, cc-by-1-0, cc-by-2-0, cc-by-3-0, cc-by-3-0-at, - * cc-by-3-0-us, cc-by-4-0, cc-by-nc-1-0, cc-by-nc-2-0, cc-by-nc-3-0, - * cc-by-nc-4-0, cc-by-nc-nd-1-0, cc-by-nc-nd-2-0, cc-by-nc-nd-3-0, - * cc-by-nc-nd-3-0-igo, cc-by-nc-nd-4-0, cc-by-nc-sa-1-0, cc-by-nc-sa-2-0, - * cc-by-nc-sa-3-0, cc-by-nc-sa-4-0, cc-by-nd-1-0, cc-by-nd-2-0, - * cc-by-nd-3-0, cc-by-nd-4-0, cc-by-sa-1-0, cc-by-sa-2-0, cc-by-sa-2-0-uk, - * cc-by-sa-2-1-jp, cc-by-sa-3-0, cc-by-sa-3-0-at, cc-by-sa-4-0, cc-pddc, - * cddl-1-0, cddl-1-1, cdla-permissive-1-0, cdla-sharing-1-0, cecill-1-0, - * cecill-1-1, cecill-2-0, cecill-2-1, cecill-b, cecill-c, cern-ohl-1-1, - * cern-ohl-1-2, cern-ohl-p-2-0, cern-ohl-s-2-0, cern-ohl-w-2-0, clartistic, - * classpath-exception-2-0, clisp-exception-2-0, cnri-jython, cnri-python, - * cnri-python-gpl-compatible, condor-1-1, copyleft-next-0-3-0, - * copyleft-next-0-3-1, cpal-1-0, cpl-1-0, cpol-1-02, crossword, - * crystal-stacker, cua-opl-1-0, cube, c-uda-1-0, curl, d-fsl-1-0, diffmark, - * digirule-foss-exception, doc, dotseqn, drl-1-0, dsdp, dvipdfm, ecl-1-0, - * ecl-2-0, ecos-exception-2-0, efl-1-0, efl-2-0, egenix, entessa, epics, - * epl-1-0, epl-2-0, erlpl-1-1, etalab-2-0, eu-datagrid, eupl-1-0, eupl-1-1, - * eupl-1-2, eurosym, fair, fawkes-runtime-exception, fltk-exception, - * font-exception-2-0, frameworx-1-0, freebsd-doc, freeimage, - * freertos-exception-2-0, fsfap, fsful, fsfullr, ftl, gcc-exception-2-0, - * gcc-exception-3-1, gd, gfdl-1-1-invariants-only, - * gfdl-1-1-invariants-or-later, gfdl-1-1-no-invariants-only, - * gfdl-1-1-no-invariants-or-later, gfdl-1-1-only, gfdl-1-1-or-later, - * gfdl-1-2-invariants-only, gfdl-1-2-invariants-or-later, - * gfdl-1-2-no-invariants-only, gfdl-1-2-no-invariants-or-later, - * gfdl-1-2-only, gfdl-1-2-or-later, gfdl-1-3-invariants-only, - * gfdl-1-3-invariants-or-later, gfdl-1-3-no-invariants-only, - * gfdl-1-3-no-invariants-or-later, gfdl-1-3-only, gfdl-1-3-or-later, - * giftware, gl2ps, glide, glulxe, glwtpl, gnu-javamail-exception, gnuplot, - * gpl-1-0-only, gpl-1-0-or-later, gpl-2-0-only, gpl-2-0-or-later, - * gpl-3-0-linking-exception, gpl-3-0-linking-source-exception, - * gpl-3-0-only, gpl-3-0-or-later, gpl-cc-1-0, gsoap-1-3b, haskell-report, - * hippocratic-2-1, hpnd, hpnd-sell-variant, htmltidy, - * i2p-gpl-java-exception, ibm-pibs, icu, ijg, image-magick, imatix, imlib2, - * info-zip, intel, intel-acpi, interbase-1-0, ipa, ipl-1-0, isc, - * jasper-2-0, jpnic, json, lal-1-2, lal-1-3, latex2e, leptonica, - * lgpl-2-0-only, lgpl-2-0-or-later, lgpl-2-1-only, lgpl-2-1-or-later, - * lgpl-3-0-linking-exception, lgpl-3-0-only, lgpl-3-0-or-later, lgpllr, - * libpng, libpng-2-0, libselinux-1-0, libtiff, libtool-exception, - * liliq-p-1-1, liliq-r-1-1, liliq-rplus-1-1, linux-openib, - * linux-syscall-note, llvm-exception, lpl-1-0, lpl-1-02, lppl-1-0, - * lppl-1-1, lppl-1-2, lppl-1-3a, lppl-1-3c, lzma-exception, make-index, - * mif-exception, miros, mit, mit-0, mit-advertising, mit-cmu, mit-enna, - * mit-feh, mit-modern-variant, mitnfa, mit-open-group, motosoto, mpich2, - * mpl-1-0, mpl-1-1, mpl-2-0, mpl-2-0-no-copyleft-exception, ms-pl, ms-rl, - * mtll, mulanpsl-1-0, mulanpsl-2-0, multics, mup, naist-2003, nasa-1-3, - * naumen, nbpl-1-0, ncgl-uk-2-0, ncsa, netcdf, net-snmp, newsletr, ngpl, - * nist-pd, nist-pd-fallback, nlod-1-0, nlpl, nokia, nokia-qt-exception-1-1, - * nosl, noweb, npl-1-0, npl-1-1, nposl-3-0, nrl, ntp, ntp-0, - * ocaml-lgpl-linking-exception, occt-exception-1-0, occt-pl, oclc-2-0, - * odbl-1-0, odc-by-1-0, ofl-1-0, ofl-1-0-no-rfn, ofl-1-0-rfn, ofl-1-1, - * ofl-1-1-no-rfn, ofl-1-1-rfn, ogc-1-0, ogdl-taiwan-1-0, ogl-canada-2-0, - * ogl-uk-1-0, ogl-uk-2-0, ogl-uk-3-0, ogtsl, oldap-1-1, oldap-1-2, - * oldap-1-3, oldap-1-4, oldap-2-0, oldap-2-0-1, oldap-2-1, oldap-2-2, - * oldap-2-2-1, oldap-2-2-2, oldap-2-3, oldap-2-4, oldap-2-7, oml, - * openjdk-assembly-exception-1-0, openssl, openvpn-openssl-exception, - * opl-1-0, oset-pl-2-1, osl-1-0, osl-1-1, osl-2-0, osl-2-1, osl-3-0, - * o-uda-1-0, parity-6-0-0, parity-7-0-0, pddl-1-0, php-3-0, php-3-01, - * plexus, polyform-noncommercial-1-0-0, polyform-small-business-1-0-0, - * postgresql, psf-2-0, psfrag, ps-or-pdf-font-exception-20170817, psutils, - * python-2-0, qhull, qpl-1-0, qt-gpl-exception-1-0, qt-lgpl-exception-1-1, - * qwt-exception-1-0, rdisc, rhecos-1-1, rpl-1-1, rpsl-1-0, rsa-md, rscpl, - * ruby, saxpath, sax-pd, scea, sendmail, sendmail-8-23, sgi-b-1-0, - * sgi-b-1-1, sgi-b-2-0, shl-0-51, shl-2-0, shl-2-1, simpl-2-0, sissl, - * sissl-1-2, sleepycat, smlnj, smppl, snia, spencer-86, spencer-94, - * spencer-99, spl-1-0, ssh-openssh, ssh-short, sspl-1-0, sugarcrm-1-1-3, - * swift-exception, swl, tapr-ohl-1-0, tcl, tcp-wrappers, tmate, torque-1-1, - * tosl, tu-berlin-1-0, tu-berlin-2-0, u-boot-exception-2-0, ucl-1-0, - * unicode-dfs-2015, unicode-dfs-2016, unicode-tou, - * universal-foss-exception-1-0, unlicense, upl-1-0, vim, vostrom, vsl-1-0, - * w3c, w3c-19980720, w3c-20150513, watcom-1-0, wsuipa, wtfpl, - * wxwindows-exception-3-1, x11, xerox, xfree86-1-1, xinetd, xnet, xpp, - * xskat, ypl-1-0, ypl-1-1, zed, zend-2-0, zimbra-1-3, zimbra-1-4, zlib, - * zlib-acknowledgement, zpl-1-1, zpl-2-0, zpl-2-1. - * - * Generated from protobuf field string license = 3; - */ - protected $license = ''; - /** - * README template name. - * Valid template name(s) are: default. - * - * Generated from protobuf field string readme = 4; - */ - protected $readme = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $default_branch - * Default branch name of the repository. - * @type string[] $gitignores - * List of gitignore template names user can choose from. - * Valid values: actionscript, ada, agda, android, - * anjuta, ansible, appcelerator-titanium, app-engine, archives, - * arch-linux-packages, atmel-studio, autotools, backup, bazaar, bazel, - * bitrix, bricx-cc, c, cake-php, calabash, cf-wheels, chef-cookbook, - * clojure, cloud9, c-make, code-igniter, code-kit, code-sniffer, - * common-lisp, composer, concrete5, coq, cordova, cpp, craft-cms, cuda, - * cvs, d, dart, dart-editor, delphi, diff, dm, dreamweaver, dropbox, - * drupal, drupal-7, eagle, eclipse, eiffel-studio, elisp, elixir, elm, - * emacs, ensime, epi-server, erlang, esp-idf, espresso, exercism, - * expression-engine, ext-js, fancy, finale, flex-builder, force-dot-com, - * fortran, fuel-php, gcov, git-book, gnome-shell-extension, go, godot, gpg, - * gradle, grails, gwt, haskell, hugo, iar-ewarm, idris, igor-pro, images, - * infor-cms, java, jboss, jboss-4, jboss-6, jdeveloper, jekyll, - * jenkins-home, jenv, jet-brains, jigsaw, joomla, julia, jupyter-notebooks, - * kate, kdevelop4, kentico, ki-cad, kohana, kotlin, lab-view, laravel, - * lazarus, leiningen, lemon-stand, libre-office, lilypond, linux, lithium, - * logtalk, lua, lyx, mac-os, magento, magento-1, magento-2, matlab, maven, - * mercurial, mercury, metals, meta-programming-system, meteor, - * microsoft-office, model-sim, momentics, mono-develop, nanoc, net-beans, - * nikola, nim, ninja, node, notepad-pp, nwjs, objective--c, ocaml, octave, - * opa, open-cart, openssl, oracle-forms, otto, packer, patch, perl, perl6, - * phalcon, phoenix, pimcore, play-framework, plone, prestashop, processing, - * psoc-creator, puppet, pure-script, putty, python, qooxdoo, qt, r, racket, - * rails, raku, red, redcar, redis, rhodes-rhomobile, ros, ruby, rust, sam, - * sass, sbt, scala, scheme, scons, scrivener, sdcc, seam-gen, sketch-up, - * slick-edit, smalltalk, snap, splunk, stata, stella, sublime-text, - * sugar-crm, svn, swift, symfony, symphony-cms, synopsys-vcs, tags, - * terraform, tex, text-mate, textpattern, think-php, tortoise-git, - * turbo-gears-2, typo3, umbraco, unity, unreal-engine, vagrant, vim, - * virtual-env, virtuoso, visual-studio, visual-studio-code, vue, vvvv, waf, - * web-methods, windows, word-press, xcode, xilinx, xilinx-ise, xojo, - * yeoman, yii, zend-framework, zephir. - * @type string $license - * License template name user can choose from. - * Valid values: license-0bsd, license-389-exception, aal, abstyles, - * adobe-2006, adobe-glyph, adsl, afl-1-1, afl-1-2, afl-2-0, afl-2-1, - * afl-3-0, afmparse, agpl-1-0, agpl-1-0-only, agpl-1-0-or-later, - * agpl-3-0-only, agpl-3-0-or-later, aladdin, amdplpa, aml, ampas, antlr-pd, - * antlr-pd-fallback, apache-1-0, apache-1-1, apache-2-0, apafml, apl-1-0, - * apsl-1-0, apsl-1-1, apsl-1-2, apsl-2-0, artistic-1-0, artistic-1-0-cl8, - * artistic-1-0-perl, artistic-2-0, autoconf-exception-2-0, - * autoconf-exception-3-0, bahyph, barr, beerware, bison-exception-2-2, - * bittorrent-1-0, bittorrent-1-1, blessing, blueoak-1-0-0, - * bootloader-exception, borceux, bsd-1-clause, bsd-2-clause, - * bsd-2-clause-freebsd, bsd-2-clause-netbsd, bsd-2-clause-patent, - * bsd-2-clause-views, bsd-3-clause, bsd-3-clause-attribution, - * bsd-3-clause-clear, bsd-3-clause-lbnl, bsd-3-clause-modification, - * bsd-3-clause-no-nuclear-license, bsd-3-clause-no-nuclear-license-2014, - * bsd-3-clause-no-nuclear-warranty, bsd-3-clause-open-mpi, bsd-4-clause, - * bsd-4-clause-shortened, bsd-4-clause-uc, bsd-protection, bsd-source-code, - * bsl-1-0, busl-1-1, cal-1-0, cal-1-0-combined-work-exception, caldera, - * catosl-1-1, cc0-1-0, cc-by-1-0, cc-by-2-0, cc-by-3-0, cc-by-3-0-at, - * cc-by-3-0-us, cc-by-4-0, cc-by-nc-1-0, cc-by-nc-2-0, cc-by-nc-3-0, - * cc-by-nc-4-0, cc-by-nc-nd-1-0, cc-by-nc-nd-2-0, cc-by-nc-nd-3-0, - * cc-by-nc-nd-3-0-igo, cc-by-nc-nd-4-0, cc-by-nc-sa-1-0, cc-by-nc-sa-2-0, - * cc-by-nc-sa-3-0, cc-by-nc-sa-4-0, cc-by-nd-1-0, cc-by-nd-2-0, - * cc-by-nd-3-0, cc-by-nd-4-0, cc-by-sa-1-0, cc-by-sa-2-0, cc-by-sa-2-0-uk, - * cc-by-sa-2-1-jp, cc-by-sa-3-0, cc-by-sa-3-0-at, cc-by-sa-4-0, cc-pddc, - * cddl-1-0, cddl-1-1, cdla-permissive-1-0, cdla-sharing-1-0, cecill-1-0, - * cecill-1-1, cecill-2-0, cecill-2-1, cecill-b, cecill-c, cern-ohl-1-1, - * cern-ohl-1-2, cern-ohl-p-2-0, cern-ohl-s-2-0, cern-ohl-w-2-0, clartistic, - * classpath-exception-2-0, clisp-exception-2-0, cnri-jython, cnri-python, - * cnri-python-gpl-compatible, condor-1-1, copyleft-next-0-3-0, - * copyleft-next-0-3-1, cpal-1-0, cpl-1-0, cpol-1-02, crossword, - * crystal-stacker, cua-opl-1-0, cube, c-uda-1-0, curl, d-fsl-1-0, diffmark, - * digirule-foss-exception, doc, dotseqn, drl-1-0, dsdp, dvipdfm, ecl-1-0, - * ecl-2-0, ecos-exception-2-0, efl-1-0, efl-2-0, egenix, entessa, epics, - * epl-1-0, epl-2-0, erlpl-1-1, etalab-2-0, eu-datagrid, eupl-1-0, eupl-1-1, - * eupl-1-2, eurosym, fair, fawkes-runtime-exception, fltk-exception, - * font-exception-2-0, frameworx-1-0, freebsd-doc, freeimage, - * freertos-exception-2-0, fsfap, fsful, fsfullr, ftl, gcc-exception-2-0, - * gcc-exception-3-1, gd, gfdl-1-1-invariants-only, - * gfdl-1-1-invariants-or-later, gfdl-1-1-no-invariants-only, - * gfdl-1-1-no-invariants-or-later, gfdl-1-1-only, gfdl-1-1-or-later, - * gfdl-1-2-invariants-only, gfdl-1-2-invariants-or-later, - * gfdl-1-2-no-invariants-only, gfdl-1-2-no-invariants-or-later, - * gfdl-1-2-only, gfdl-1-2-or-later, gfdl-1-3-invariants-only, - * gfdl-1-3-invariants-or-later, gfdl-1-3-no-invariants-only, - * gfdl-1-3-no-invariants-or-later, gfdl-1-3-only, gfdl-1-3-or-later, - * giftware, gl2ps, glide, glulxe, glwtpl, gnu-javamail-exception, gnuplot, - * gpl-1-0-only, gpl-1-0-or-later, gpl-2-0-only, gpl-2-0-or-later, - * gpl-3-0-linking-exception, gpl-3-0-linking-source-exception, - * gpl-3-0-only, gpl-3-0-or-later, gpl-cc-1-0, gsoap-1-3b, haskell-report, - * hippocratic-2-1, hpnd, hpnd-sell-variant, htmltidy, - * i2p-gpl-java-exception, ibm-pibs, icu, ijg, image-magick, imatix, imlib2, - * info-zip, intel, intel-acpi, interbase-1-0, ipa, ipl-1-0, isc, - * jasper-2-0, jpnic, json, lal-1-2, lal-1-3, latex2e, leptonica, - * lgpl-2-0-only, lgpl-2-0-or-later, lgpl-2-1-only, lgpl-2-1-or-later, - * lgpl-3-0-linking-exception, lgpl-3-0-only, lgpl-3-0-or-later, lgpllr, - * libpng, libpng-2-0, libselinux-1-0, libtiff, libtool-exception, - * liliq-p-1-1, liliq-r-1-1, liliq-rplus-1-1, linux-openib, - * linux-syscall-note, llvm-exception, lpl-1-0, lpl-1-02, lppl-1-0, - * lppl-1-1, lppl-1-2, lppl-1-3a, lppl-1-3c, lzma-exception, make-index, - * mif-exception, miros, mit, mit-0, mit-advertising, mit-cmu, mit-enna, - * mit-feh, mit-modern-variant, mitnfa, mit-open-group, motosoto, mpich2, - * mpl-1-0, mpl-1-1, mpl-2-0, mpl-2-0-no-copyleft-exception, ms-pl, ms-rl, - * mtll, mulanpsl-1-0, mulanpsl-2-0, multics, mup, naist-2003, nasa-1-3, - * naumen, nbpl-1-0, ncgl-uk-2-0, ncsa, netcdf, net-snmp, newsletr, ngpl, - * nist-pd, nist-pd-fallback, nlod-1-0, nlpl, nokia, nokia-qt-exception-1-1, - * nosl, noweb, npl-1-0, npl-1-1, nposl-3-0, nrl, ntp, ntp-0, - * ocaml-lgpl-linking-exception, occt-exception-1-0, occt-pl, oclc-2-0, - * odbl-1-0, odc-by-1-0, ofl-1-0, ofl-1-0-no-rfn, ofl-1-0-rfn, ofl-1-1, - * ofl-1-1-no-rfn, ofl-1-1-rfn, ogc-1-0, ogdl-taiwan-1-0, ogl-canada-2-0, - * ogl-uk-1-0, ogl-uk-2-0, ogl-uk-3-0, ogtsl, oldap-1-1, oldap-1-2, - * oldap-1-3, oldap-1-4, oldap-2-0, oldap-2-0-1, oldap-2-1, oldap-2-2, - * oldap-2-2-1, oldap-2-2-2, oldap-2-3, oldap-2-4, oldap-2-7, oml, - * openjdk-assembly-exception-1-0, openssl, openvpn-openssl-exception, - * opl-1-0, oset-pl-2-1, osl-1-0, osl-1-1, osl-2-0, osl-2-1, osl-3-0, - * o-uda-1-0, parity-6-0-0, parity-7-0-0, pddl-1-0, php-3-0, php-3-01, - * plexus, polyform-noncommercial-1-0-0, polyform-small-business-1-0-0, - * postgresql, psf-2-0, psfrag, ps-or-pdf-font-exception-20170817, psutils, - * python-2-0, qhull, qpl-1-0, qt-gpl-exception-1-0, qt-lgpl-exception-1-1, - * qwt-exception-1-0, rdisc, rhecos-1-1, rpl-1-1, rpsl-1-0, rsa-md, rscpl, - * ruby, saxpath, sax-pd, scea, sendmail, sendmail-8-23, sgi-b-1-0, - * sgi-b-1-1, sgi-b-2-0, shl-0-51, shl-2-0, shl-2-1, simpl-2-0, sissl, - * sissl-1-2, sleepycat, smlnj, smppl, snia, spencer-86, spencer-94, - * spencer-99, spl-1-0, ssh-openssh, ssh-short, sspl-1-0, sugarcrm-1-1-3, - * swift-exception, swl, tapr-ohl-1-0, tcl, tcp-wrappers, tmate, torque-1-1, - * tosl, tu-berlin-1-0, tu-berlin-2-0, u-boot-exception-2-0, ucl-1-0, - * unicode-dfs-2015, unicode-dfs-2016, unicode-tou, - * universal-foss-exception-1-0, unlicense, upl-1-0, vim, vostrom, vsl-1-0, - * w3c, w3c-19980720, w3c-20150513, watcom-1-0, wsuipa, wtfpl, - * wxwindows-exception-3-1, x11, xerox, xfree86-1-1, xinetd, xnet, xpp, - * xskat, ypl-1-0, ypl-1-1, zed, zend-2-0, zimbra-1-3, zimbra-1-4, zlib, - * zlib-acknowledgement, zpl-1-1, zpl-2-0, zpl-2-1. - * @type string $readme - * README template name. - * Valid template name(s) are: default. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Default branch name of the repository. - * - * Generated from protobuf field string default_branch = 1; - * @return string - */ - public function getDefaultBranch() - { - return $this->default_branch; - } - - /** - * Default branch name of the repository. - * - * Generated from protobuf field string default_branch = 1; - * @param string $var - * @return $this - */ - public function setDefaultBranch($var) - { - GPBUtil::checkString($var, True); - $this->default_branch = $var; - - return $this; - } - - /** - * List of gitignore template names user can choose from. - * Valid values: actionscript, ada, agda, android, - * anjuta, ansible, appcelerator-titanium, app-engine, archives, - * arch-linux-packages, atmel-studio, autotools, backup, bazaar, bazel, - * bitrix, bricx-cc, c, cake-php, calabash, cf-wheels, chef-cookbook, - * clojure, cloud9, c-make, code-igniter, code-kit, code-sniffer, - * common-lisp, composer, concrete5, coq, cordova, cpp, craft-cms, cuda, - * cvs, d, dart, dart-editor, delphi, diff, dm, dreamweaver, dropbox, - * drupal, drupal-7, eagle, eclipse, eiffel-studio, elisp, elixir, elm, - * emacs, ensime, epi-server, erlang, esp-idf, espresso, exercism, - * expression-engine, ext-js, fancy, finale, flex-builder, force-dot-com, - * fortran, fuel-php, gcov, git-book, gnome-shell-extension, go, godot, gpg, - * gradle, grails, gwt, haskell, hugo, iar-ewarm, idris, igor-pro, images, - * infor-cms, java, jboss, jboss-4, jboss-6, jdeveloper, jekyll, - * jenkins-home, jenv, jet-brains, jigsaw, joomla, julia, jupyter-notebooks, - * kate, kdevelop4, kentico, ki-cad, kohana, kotlin, lab-view, laravel, - * lazarus, leiningen, lemon-stand, libre-office, lilypond, linux, lithium, - * logtalk, lua, lyx, mac-os, magento, magento-1, magento-2, matlab, maven, - * mercurial, mercury, metals, meta-programming-system, meteor, - * microsoft-office, model-sim, momentics, mono-develop, nanoc, net-beans, - * nikola, nim, ninja, node, notepad-pp, nwjs, objective--c, ocaml, octave, - * opa, open-cart, openssl, oracle-forms, otto, packer, patch, perl, perl6, - * phalcon, phoenix, pimcore, play-framework, plone, prestashop, processing, - * psoc-creator, puppet, pure-script, putty, python, qooxdoo, qt, r, racket, - * rails, raku, red, redcar, redis, rhodes-rhomobile, ros, ruby, rust, sam, - * sass, sbt, scala, scheme, scons, scrivener, sdcc, seam-gen, sketch-up, - * slick-edit, smalltalk, snap, splunk, stata, stella, sublime-text, - * sugar-crm, svn, swift, symfony, symphony-cms, synopsys-vcs, tags, - * terraform, tex, text-mate, textpattern, think-php, tortoise-git, - * turbo-gears-2, typo3, umbraco, unity, unreal-engine, vagrant, vim, - * virtual-env, virtuoso, visual-studio, visual-studio-code, vue, vvvv, waf, - * web-methods, windows, word-press, xcode, xilinx, xilinx-ise, xojo, - * yeoman, yii, zend-framework, zephir. - * - * Generated from protobuf field repeated string gitignores = 2; - * @return RepeatedField - */ - public function getGitignores() - { - return $this->gitignores; - } - - /** - * List of gitignore template names user can choose from. - * Valid values: actionscript, ada, agda, android, - * anjuta, ansible, appcelerator-titanium, app-engine, archives, - * arch-linux-packages, atmel-studio, autotools, backup, bazaar, bazel, - * bitrix, bricx-cc, c, cake-php, calabash, cf-wheels, chef-cookbook, - * clojure, cloud9, c-make, code-igniter, code-kit, code-sniffer, - * common-lisp, composer, concrete5, coq, cordova, cpp, craft-cms, cuda, - * cvs, d, dart, dart-editor, delphi, diff, dm, dreamweaver, dropbox, - * drupal, drupal-7, eagle, eclipse, eiffel-studio, elisp, elixir, elm, - * emacs, ensime, epi-server, erlang, esp-idf, espresso, exercism, - * expression-engine, ext-js, fancy, finale, flex-builder, force-dot-com, - * fortran, fuel-php, gcov, git-book, gnome-shell-extension, go, godot, gpg, - * gradle, grails, gwt, haskell, hugo, iar-ewarm, idris, igor-pro, images, - * infor-cms, java, jboss, jboss-4, jboss-6, jdeveloper, jekyll, - * jenkins-home, jenv, jet-brains, jigsaw, joomla, julia, jupyter-notebooks, - * kate, kdevelop4, kentico, ki-cad, kohana, kotlin, lab-view, laravel, - * lazarus, leiningen, lemon-stand, libre-office, lilypond, linux, lithium, - * logtalk, lua, lyx, mac-os, magento, magento-1, magento-2, matlab, maven, - * mercurial, mercury, metals, meta-programming-system, meteor, - * microsoft-office, model-sim, momentics, mono-develop, nanoc, net-beans, - * nikola, nim, ninja, node, notepad-pp, nwjs, objective--c, ocaml, octave, - * opa, open-cart, openssl, oracle-forms, otto, packer, patch, perl, perl6, - * phalcon, phoenix, pimcore, play-framework, plone, prestashop, processing, - * psoc-creator, puppet, pure-script, putty, python, qooxdoo, qt, r, racket, - * rails, raku, red, redcar, redis, rhodes-rhomobile, ros, ruby, rust, sam, - * sass, sbt, scala, scheme, scons, scrivener, sdcc, seam-gen, sketch-up, - * slick-edit, smalltalk, snap, splunk, stata, stella, sublime-text, - * sugar-crm, svn, swift, symfony, symphony-cms, synopsys-vcs, tags, - * terraform, tex, text-mate, textpattern, think-php, tortoise-git, - * turbo-gears-2, typo3, umbraco, unity, unreal-engine, vagrant, vim, - * virtual-env, virtuoso, visual-studio, visual-studio-code, vue, vvvv, waf, - * web-methods, windows, word-press, xcode, xilinx, xilinx-ise, xojo, - * yeoman, yii, zend-framework, zephir. - * - * Generated from protobuf field repeated string gitignores = 2; - * @param string[] $var - * @return $this - */ - public function setGitignores($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->gitignores = $arr; - - return $this; - } - - /** - * License template name user can choose from. - * Valid values: license-0bsd, license-389-exception, aal, abstyles, - * adobe-2006, adobe-glyph, adsl, afl-1-1, afl-1-2, afl-2-0, afl-2-1, - * afl-3-0, afmparse, agpl-1-0, agpl-1-0-only, agpl-1-0-or-later, - * agpl-3-0-only, agpl-3-0-or-later, aladdin, amdplpa, aml, ampas, antlr-pd, - * antlr-pd-fallback, apache-1-0, apache-1-1, apache-2-0, apafml, apl-1-0, - * apsl-1-0, apsl-1-1, apsl-1-2, apsl-2-0, artistic-1-0, artistic-1-0-cl8, - * artistic-1-0-perl, artistic-2-0, autoconf-exception-2-0, - * autoconf-exception-3-0, bahyph, barr, beerware, bison-exception-2-2, - * bittorrent-1-0, bittorrent-1-1, blessing, blueoak-1-0-0, - * bootloader-exception, borceux, bsd-1-clause, bsd-2-clause, - * bsd-2-clause-freebsd, bsd-2-clause-netbsd, bsd-2-clause-patent, - * bsd-2-clause-views, bsd-3-clause, bsd-3-clause-attribution, - * bsd-3-clause-clear, bsd-3-clause-lbnl, bsd-3-clause-modification, - * bsd-3-clause-no-nuclear-license, bsd-3-clause-no-nuclear-license-2014, - * bsd-3-clause-no-nuclear-warranty, bsd-3-clause-open-mpi, bsd-4-clause, - * bsd-4-clause-shortened, bsd-4-clause-uc, bsd-protection, bsd-source-code, - * bsl-1-0, busl-1-1, cal-1-0, cal-1-0-combined-work-exception, caldera, - * catosl-1-1, cc0-1-0, cc-by-1-0, cc-by-2-0, cc-by-3-0, cc-by-3-0-at, - * cc-by-3-0-us, cc-by-4-0, cc-by-nc-1-0, cc-by-nc-2-0, cc-by-nc-3-0, - * cc-by-nc-4-0, cc-by-nc-nd-1-0, cc-by-nc-nd-2-0, cc-by-nc-nd-3-0, - * cc-by-nc-nd-3-0-igo, cc-by-nc-nd-4-0, cc-by-nc-sa-1-0, cc-by-nc-sa-2-0, - * cc-by-nc-sa-3-0, cc-by-nc-sa-4-0, cc-by-nd-1-0, cc-by-nd-2-0, - * cc-by-nd-3-0, cc-by-nd-4-0, cc-by-sa-1-0, cc-by-sa-2-0, cc-by-sa-2-0-uk, - * cc-by-sa-2-1-jp, cc-by-sa-3-0, cc-by-sa-3-0-at, cc-by-sa-4-0, cc-pddc, - * cddl-1-0, cddl-1-1, cdla-permissive-1-0, cdla-sharing-1-0, cecill-1-0, - * cecill-1-1, cecill-2-0, cecill-2-1, cecill-b, cecill-c, cern-ohl-1-1, - * cern-ohl-1-2, cern-ohl-p-2-0, cern-ohl-s-2-0, cern-ohl-w-2-0, clartistic, - * classpath-exception-2-0, clisp-exception-2-0, cnri-jython, cnri-python, - * cnri-python-gpl-compatible, condor-1-1, copyleft-next-0-3-0, - * copyleft-next-0-3-1, cpal-1-0, cpl-1-0, cpol-1-02, crossword, - * crystal-stacker, cua-opl-1-0, cube, c-uda-1-0, curl, d-fsl-1-0, diffmark, - * digirule-foss-exception, doc, dotseqn, drl-1-0, dsdp, dvipdfm, ecl-1-0, - * ecl-2-0, ecos-exception-2-0, efl-1-0, efl-2-0, egenix, entessa, epics, - * epl-1-0, epl-2-0, erlpl-1-1, etalab-2-0, eu-datagrid, eupl-1-0, eupl-1-1, - * eupl-1-2, eurosym, fair, fawkes-runtime-exception, fltk-exception, - * font-exception-2-0, frameworx-1-0, freebsd-doc, freeimage, - * freertos-exception-2-0, fsfap, fsful, fsfullr, ftl, gcc-exception-2-0, - * gcc-exception-3-1, gd, gfdl-1-1-invariants-only, - * gfdl-1-1-invariants-or-later, gfdl-1-1-no-invariants-only, - * gfdl-1-1-no-invariants-or-later, gfdl-1-1-only, gfdl-1-1-or-later, - * gfdl-1-2-invariants-only, gfdl-1-2-invariants-or-later, - * gfdl-1-2-no-invariants-only, gfdl-1-2-no-invariants-or-later, - * gfdl-1-2-only, gfdl-1-2-or-later, gfdl-1-3-invariants-only, - * gfdl-1-3-invariants-or-later, gfdl-1-3-no-invariants-only, - * gfdl-1-3-no-invariants-or-later, gfdl-1-3-only, gfdl-1-3-or-later, - * giftware, gl2ps, glide, glulxe, glwtpl, gnu-javamail-exception, gnuplot, - * gpl-1-0-only, gpl-1-0-or-later, gpl-2-0-only, gpl-2-0-or-later, - * gpl-3-0-linking-exception, gpl-3-0-linking-source-exception, - * gpl-3-0-only, gpl-3-0-or-later, gpl-cc-1-0, gsoap-1-3b, haskell-report, - * hippocratic-2-1, hpnd, hpnd-sell-variant, htmltidy, - * i2p-gpl-java-exception, ibm-pibs, icu, ijg, image-magick, imatix, imlib2, - * info-zip, intel, intel-acpi, interbase-1-0, ipa, ipl-1-0, isc, - * jasper-2-0, jpnic, json, lal-1-2, lal-1-3, latex2e, leptonica, - * lgpl-2-0-only, lgpl-2-0-or-later, lgpl-2-1-only, lgpl-2-1-or-later, - * lgpl-3-0-linking-exception, lgpl-3-0-only, lgpl-3-0-or-later, lgpllr, - * libpng, libpng-2-0, libselinux-1-0, libtiff, libtool-exception, - * liliq-p-1-1, liliq-r-1-1, liliq-rplus-1-1, linux-openib, - * linux-syscall-note, llvm-exception, lpl-1-0, lpl-1-02, lppl-1-0, - * lppl-1-1, lppl-1-2, lppl-1-3a, lppl-1-3c, lzma-exception, make-index, - * mif-exception, miros, mit, mit-0, mit-advertising, mit-cmu, mit-enna, - * mit-feh, mit-modern-variant, mitnfa, mit-open-group, motosoto, mpich2, - * mpl-1-0, mpl-1-1, mpl-2-0, mpl-2-0-no-copyleft-exception, ms-pl, ms-rl, - * mtll, mulanpsl-1-0, mulanpsl-2-0, multics, mup, naist-2003, nasa-1-3, - * naumen, nbpl-1-0, ncgl-uk-2-0, ncsa, netcdf, net-snmp, newsletr, ngpl, - * nist-pd, nist-pd-fallback, nlod-1-0, nlpl, nokia, nokia-qt-exception-1-1, - * nosl, noweb, npl-1-0, npl-1-1, nposl-3-0, nrl, ntp, ntp-0, - * ocaml-lgpl-linking-exception, occt-exception-1-0, occt-pl, oclc-2-0, - * odbl-1-0, odc-by-1-0, ofl-1-0, ofl-1-0-no-rfn, ofl-1-0-rfn, ofl-1-1, - * ofl-1-1-no-rfn, ofl-1-1-rfn, ogc-1-0, ogdl-taiwan-1-0, ogl-canada-2-0, - * ogl-uk-1-0, ogl-uk-2-0, ogl-uk-3-0, ogtsl, oldap-1-1, oldap-1-2, - * oldap-1-3, oldap-1-4, oldap-2-0, oldap-2-0-1, oldap-2-1, oldap-2-2, - * oldap-2-2-1, oldap-2-2-2, oldap-2-3, oldap-2-4, oldap-2-7, oml, - * openjdk-assembly-exception-1-0, openssl, openvpn-openssl-exception, - * opl-1-0, oset-pl-2-1, osl-1-0, osl-1-1, osl-2-0, osl-2-1, osl-3-0, - * o-uda-1-0, parity-6-0-0, parity-7-0-0, pddl-1-0, php-3-0, php-3-01, - * plexus, polyform-noncommercial-1-0-0, polyform-small-business-1-0-0, - * postgresql, psf-2-0, psfrag, ps-or-pdf-font-exception-20170817, psutils, - * python-2-0, qhull, qpl-1-0, qt-gpl-exception-1-0, qt-lgpl-exception-1-1, - * qwt-exception-1-0, rdisc, rhecos-1-1, rpl-1-1, rpsl-1-0, rsa-md, rscpl, - * ruby, saxpath, sax-pd, scea, sendmail, sendmail-8-23, sgi-b-1-0, - * sgi-b-1-1, sgi-b-2-0, shl-0-51, shl-2-0, shl-2-1, simpl-2-0, sissl, - * sissl-1-2, sleepycat, smlnj, smppl, snia, spencer-86, spencer-94, - * spencer-99, spl-1-0, ssh-openssh, ssh-short, sspl-1-0, sugarcrm-1-1-3, - * swift-exception, swl, tapr-ohl-1-0, tcl, tcp-wrappers, tmate, torque-1-1, - * tosl, tu-berlin-1-0, tu-berlin-2-0, u-boot-exception-2-0, ucl-1-0, - * unicode-dfs-2015, unicode-dfs-2016, unicode-tou, - * universal-foss-exception-1-0, unlicense, upl-1-0, vim, vostrom, vsl-1-0, - * w3c, w3c-19980720, w3c-20150513, watcom-1-0, wsuipa, wtfpl, - * wxwindows-exception-3-1, x11, xerox, xfree86-1-1, xinetd, xnet, xpp, - * xskat, ypl-1-0, ypl-1-1, zed, zend-2-0, zimbra-1-3, zimbra-1-4, zlib, - * zlib-acknowledgement, zpl-1-1, zpl-2-0, zpl-2-1. - * - * Generated from protobuf field string license = 3; - * @return string - */ - public function getLicense() - { - return $this->license; - } - - /** - * License template name user can choose from. - * Valid values: license-0bsd, license-389-exception, aal, abstyles, - * adobe-2006, adobe-glyph, adsl, afl-1-1, afl-1-2, afl-2-0, afl-2-1, - * afl-3-0, afmparse, agpl-1-0, agpl-1-0-only, agpl-1-0-or-later, - * agpl-3-0-only, agpl-3-0-or-later, aladdin, amdplpa, aml, ampas, antlr-pd, - * antlr-pd-fallback, apache-1-0, apache-1-1, apache-2-0, apafml, apl-1-0, - * apsl-1-0, apsl-1-1, apsl-1-2, apsl-2-0, artistic-1-0, artistic-1-0-cl8, - * artistic-1-0-perl, artistic-2-0, autoconf-exception-2-0, - * autoconf-exception-3-0, bahyph, barr, beerware, bison-exception-2-2, - * bittorrent-1-0, bittorrent-1-1, blessing, blueoak-1-0-0, - * bootloader-exception, borceux, bsd-1-clause, bsd-2-clause, - * bsd-2-clause-freebsd, bsd-2-clause-netbsd, bsd-2-clause-patent, - * bsd-2-clause-views, bsd-3-clause, bsd-3-clause-attribution, - * bsd-3-clause-clear, bsd-3-clause-lbnl, bsd-3-clause-modification, - * bsd-3-clause-no-nuclear-license, bsd-3-clause-no-nuclear-license-2014, - * bsd-3-clause-no-nuclear-warranty, bsd-3-clause-open-mpi, bsd-4-clause, - * bsd-4-clause-shortened, bsd-4-clause-uc, bsd-protection, bsd-source-code, - * bsl-1-0, busl-1-1, cal-1-0, cal-1-0-combined-work-exception, caldera, - * catosl-1-1, cc0-1-0, cc-by-1-0, cc-by-2-0, cc-by-3-0, cc-by-3-0-at, - * cc-by-3-0-us, cc-by-4-0, cc-by-nc-1-0, cc-by-nc-2-0, cc-by-nc-3-0, - * cc-by-nc-4-0, cc-by-nc-nd-1-0, cc-by-nc-nd-2-0, cc-by-nc-nd-3-0, - * cc-by-nc-nd-3-0-igo, cc-by-nc-nd-4-0, cc-by-nc-sa-1-0, cc-by-nc-sa-2-0, - * cc-by-nc-sa-3-0, cc-by-nc-sa-4-0, cc-by-nd-1-0, cc-by-nd-2-0, - * cc-by-nd-3-0, cc-by-nd-4-0, cc-by-sa-1-0, cc-by-sa-2-0, cc-by-sa-2-0-uk, - * cc-by-sa-2-1-jp, cc-by-sa-3-0, cc-by-sa-3-0-at, cc-by-sa-4-0, cc-pddc, - * cddl-1-0, cddl-1-1, cdla-permissive-1-0, cdla-sharing-1-0, cecill-1-0, - * cecill-1-1, cecill-2-0, cecill-2-1, cecill-b, cecill-c, cern-ohl-1-1, - * cern-ohl-1-2, cern-ohl-p-2-0, cern-ohl-s-2-0, cern-ohl-w-2-0, clartistic, - * classpath-exception-2-0, clisp-exception-2-0, cnri-jython, cnri-python, - * cnri-python-gpl-compatible, condor-1-1, copyleft-next-0-3-0, - * copyleft-next-0-3-1, cpal-1-0, cpl-1-0, cpol-1-02, crossword, - * crystal-stacker, cua-opl-1-0, cube, c-uda-1-0, curl, d-fsl-1-0, diffmark, - * digirule-foss-exception, doc, dotseqn, drl-1-0, dsdp, dvipdfm, ecl-1-0, - * ecl-2-0, ecos-exception-2-0, efl-1-0, efl-2-0, egenix, entessa, epics, - * epl-1-0, epl-2-0, erlpl-1-1, etalab-2-0, eu-datagrid, eupl-1-0, eupl-1-1, - * eupl-1-2, eurosym, fair, fawkes-runtime-exception, fltk-exception, - * font-exception-2-0, frameworx-1-0, freebsd-doc, freeimage, - * freertos-exception-2-0, fsfap, fsful, fsfullr, ftl, gcc-exception-2-0, - * gcc-exception-3-1, gd, gfdl-1-1-invariants-only, - * gfdl-1-1-invariants-or-later, gfdl-1-1-no-invariants-only, - * gfdl-1-1-no-invariants-or-later, gfdl-1-1-only, gfdl-1-1-or-later, - * gfdl-1-2-invariants-only, gfdl-1-2-invariants-or-later, - * gfdl-1-2-no-invariants-only, gfdl-1-2-no-invariants-or-later, - * gfdl-1-2-only, gfdl-1-2-or-later, gfdl-1-3-invariants-only, - * gfdl-1-3-invariants-or-later, gfdl-1-3-no-invariants-only, - * gfdl-1-3-no-invariants-or-later, gfdl-1-3-only, gfdl-1-3-or-later, - * giftware, gl2ps, glide, glulxe, glwtpl, gnu-javamail-exception, gnuplot, - * gpl-1-0-only, gpl-1-0-or-later, gpl-2-0-only, gpl-2-0-or-later, - * gpl-3-0-linking-exception, gpl-3-0-linking-source-exception, - * gpl-3-0-only, gpl-3-0-or-later, gpl-cc-1-0, gsoap-1-3b, haskell-report, - * hippocratic-2-1, hpnd, hpnd-sell-variant, htmltidy, - * i2p-gpl-java-exception, ibm-pibs, icu, ijg, image-magick, imatix, imlib2, - * info-zip, intel, intel-acpi, interbase-1-0, ipa, ipl-1-0, isc, - * jasper-2-0, jpnic, json, lal-1-2, lal-1-3, latex2e, leptonica, - * lgpl-2-0-only, lgpl-2-0-or-later, lgpl-2-1-only, lgpl-2-1-or-later, - * lgpl-3-0-linking-exception, lgpl-3-0-only, lgpl-3-0-or-later, lgpllr, - * libpng, libpng-2-0, libselinux-1-0, libtiff, libtool-exception, - * liliq-p-1-1, liliq-r-1-1, liliq-rplus-1-1, linux-openib, - * linux-syscall-note, llvm-exception, lpl-1-0, lpl-1-02, lppl-1-0, - * lppl-1-1, lppl-1-2, lppl-1-3a, lppl-1-3c, lzma-exception, make-index, - * mif-exception, miros, mit, mit-0, mit-advertising, mit-cmu, mit-enna, - * mit-feh, mit-modern-variant, mitnfa, mit-open-group, motosoto, mpich2, - * mpl-1-0, mpl-1-1, mpl-2-0, mpl-2-0-no-copyleft-exception, ms-pl, ms-rl, - * mtll, mulanpsl-1-0, mulanpsl-2-0, multics, mup, naist-2003, nasa-1-3, - * naumen, nbpl-1-0, ncgl-uk-2-0, ncsa, netcdf, net-snmp, newsletr, ngpl, - * nist-pd, nist-pd-fallback, nlod-1-0, nlpl, nokia, nokia-qt-exception-1-1, - * nosl, noweb, npl-1-0, npl-1-1, nposl-3-0, nrl, ntp, ntp-0, - * ocaml-lgpl-linking-exception, occt-exception-1-0, occt-pl, oclc-2-0, - * odbl-1-0, odc-by-1-0, ofl-1-0, ofl-1-0-no-rfn, ofl-1-0-rfn, ofl-1-1, - * ofl-1-1-no-rfn, ofl-1-1-rfn, ogc-1-0, ogdl-taiwan-1-0, ogl-canada-2-0, - * ogl-uk-1-0, ogl-uk-2-0, ogl-uk-3-0, ogtsl, oldap-1-1, oldap-1-2, - * oldap-1-3, oldap-1-4, oldap-2-0, oldap-2-0-1, oldap-2-1, oldap-2-2, - * oldap-2-2-1, oldap-2-2-2, oldap-2-3, oldap-2-4, oldap-2-7, oml, - * openjdk-assembly-exception-1-0, openssl, openvpn-openssl-exception, - * opl-1-0, oset-pl-2-1, osl-1-0, osl-1-1, osl-2-0, osl-2-1, osl-3-0, - * o-uda-1-0, parity-6-0-0, parity-7-0-0, pddl-1-0, php-3-0, php-3-01, - * plexus, polyform-noncommercial-1-0-0, polyform-small-business-1-0-0, - * postgresql, psf-2-0, psfrag, ps-or-pdf-font-exception-20170817, psutils, - * python-2-0, qhull, qpl-1-0, qt-gpl-exception-1-0, qt-lgpl-exception-1-1, - * qwt-exception-1-0, rdisc, rhecos-1-1, rpl-1-1, rpsl-1-0, rsa-md, rscpl, - * ruby, saxpath, sax-pd, scea, sendmail, sendmail-8-23, sgi-b-1-0, - * sgi-b-1-1, sgi-b-2-0, shl-0-51, shl-2-0, shl-2-1, simpl-2-0, sissl, - * sissl-1-2, sleepycat, smlnj, smppl, snia, spencer-86, spencer-94, - * spencer-99, spl-1-0, ssh-openssh, ssh-short, sspl-1-0, sugarcrm-1-1-3, - * swift-exception, swl, tapr-ohl-1-0, tcl, tcp-wrappers, tmate, torque-1-1, - * tosl, tu-berlin-1-0, tu-berlin-2-0, u-boot-exception-2-0, ucl-1-0, - * unicode-dfs-2015, unicode-dfs-2016, unicode-tou, - * universal-foss-exception-1-0, unlicense, upl-1-0, vim, vostrom, vsl-1-0, - * w3c, w3c-19980720, w3c-20150513, watcom-1-0, wsuipa, wtfpl, - * wxwindows-exception-3-1, x11, xerox, xfree86-1-1, xinetd, xnet, xpp, - * xskat, ypl-1-0, ypl-1-1, zed, zend-2-0, zimbra-1-3, zimbra-1-4, zlib, - * zlib-acknowledgement, zpl-1-1, zpl-2-0, zpl-2-1. - * - * Generated from protobuf field string license = 3; - * @param string $var - * @return $this - */ - public function setLicense($var) - { - GPBUtil::checkString($var, True); - $this->license = $var; - - return $this; - } - - /** - * README template name. - * Valid template name(s) are: default. - * - * Generated from protobuf field string readme = 4; - * @return string - */ - public function getReadme() - { - return $this->readme; - } - - /** - * README template name. - * Valid template name(s) are: default. - * - * Generated from protobuf field string readme = 4; - * @param string $var - * @return $this - */ - public function setReadme($var) - { - GPBUtil::checkString($var, True); - $this->readme = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Repository/URIs.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Repository/URIs.php deleted file mode 100644 index 783f08e94825..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/Repository/URIs.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.securesourcemanager.v1.Repository.URIs - */ -class URIs extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. HTML is the URI for user to view the repository in a - * browser. - * - * Generated from protobuf field string html = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $html = ''; - /** - * Output only. git_https is the git HTTPS URI for git operations. - * - * Generated from protobuf field string git_https = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $git_https = ''; - /** - * Output only. API is the URI for API access. - * - * Generated from protobuf field string api = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $html - * Output only. HTML is the URI for user to view the repository in a - * browser. - * @type string $git_https - * Output only. git_https is the git HTTPS URI for git operations. - * @type string $api - * Output only. API is the URI for API access. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Output only. HTML is the URI for user to view the repository in a - * browser. - * - * Generated from protobuf field string html = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getHtml() - { - return $this->html; - } - - /** - * Output only. HTML is the URI for user to view the repository in a - * browser. - * - * Generated from protobuf field string html = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setHtml($var) - { - GPBUtil::checkString($var, True); - $this->html = $var; - - return $this; - } - - /** - * Output only. git_https is the git HTTPS URI for git operations. - * - * Generated from protobuf field string git_https = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getGitHttps() - { - return $this->git_https; - } - - /** - * Output only. git_https is the git HTTPS URI for git operations. - * - * Generated from protobuf field string git_https = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setGitHttps($var) - { - GPBUtil::checkString($var, True); - $this->git_https = $var; - - return $this; - } - - /** - * Output only. API is the URI for API access. - * - * Generated from protobuf field string api = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApi() - { - return $this->api; - } - - /** - * Output only. API is the URI for API access. - * - * Generated from protobuf field string api = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApi($var) - { - GPBUtil::checkString($var, True); - $this->api = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ResolvePullRequestCommentsRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ResolvePullRequestCommentsRequest.php deleted file mode 100644 index 7910b99e4a00..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ResolvePullRequestCommentsRequest.php +++ /dev/null @@ -1,180 +0,0 @@ -google.cloud.securesourcemanager.v1.ResolvePullRequestCommentsRequest - */ -class ResolvePullRequestCommentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * 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}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * 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. - * - * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $names; - /** - * Optional. If set, at least one comment in a thread is required, rest of the - * comments in the same thread will be automatically updated to resolved. If - * unset, all comments in the same thread need be present. - * - * Generated from protobuf field bool auto_fill = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $auto_fill = false; - - /** - * @param string $parent 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}` - * Please see {@see SecureSourceManagerClient::pullRequestName()} for help formatting this field. - * @param string[] $names 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. Please see - * {@see SecureSourceManagerClient::pullRequestCommentName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\ResolvePullRequestCommentsRequest - * - * @experimental - */ - public static function build(string $parent, array $names): self - { - return (new self()) - ->setParent($parent) - ->setNames($names); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * 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}` - * @type string[] $names - * 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. - * @type bool $auto_fill - * Optional. If set, at least one comment in a thread is required, rest of the - * comments in the same thread will be automatically updated to resolved. If - * unset, all comments in the same thread need be present. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * 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}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * 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}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * 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. - * - * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return RepeatedField - */ - public function getNames() - { - return $this->names; - } - - /** - * 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. - * - * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string[] $var - * @return $this - */ - public function setNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->names = $arr; - - return $this; - } - - /** - * Optional. If set, at least one comment in a thread is required, rest of the - * comments in the same thread will be automatically updated to resolved. If - * unset, all comments in the same thread need be present. - * - * Generated from protobuf field bool auto_fill = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAutoFill() - { - return $this->auto_fill; - } - - /** - * Optional. If set, at least one comment in a thread is required, rest of the - * comments in the same thread will be automatically updated to resolved. If - * unset, all comments in the same thread need be present. - * - * Generated from protobuf field bool auto_fill = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAutoFill($var) - { - GPBUtil::checkBool($var); - $this->auto_fill = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ResolvePullRequestCommentsResponse.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ResolvePullRequestCommentsResponse.php deleted file mode 100644 index a65e12a5b119..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/ResolvePullRequestCommentsResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.securesourcemanager.v1.ResolvePullRequestCommentsResponse - */ -class ResolvePullRequestCommentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of pull request comments resolved. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comments = 1; - */ - private $pull_request_comments; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecureSourceManager\V1\PullRequestComment[] $pull_request_comments - * The list of pull request comments resolved. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * The list of pull request comments resolved. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comments = 1; - * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\PullRequestComment> - */ - public function getPullRequestComments() - { - return $this->pull_request_comments; - } - - /** - * The list of pull request comments resolved. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comments = 1; - * @param \Google\Cloud\SecureSourceManager\V1\PullRequestComment[] $var - * @return $this - */ - public function setPullRequestComments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\PullRequestComment::class); - $this->pull_request_comments = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/TreeEntry.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/TreeEntry.php deleted file mode 100644 index 9887c977bb12..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/TreeEntry.php +++ /dev/null @@ -1,211 +0,0 @@ -google.cloud.securesourcemanager.v1.TreeEntry - */ -class TreeEntry extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The type of the object (TREE, BLOB, COMMIT). Output-only. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.TreeEntry.ObjectType type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $type = 0; - /** - * Output only. The SHA-1 hash of the object (unique identifier). Output-only. - * - * Generated from protobuf field string sha = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $sha = ''; - /** - * Output only. The path of the file or directory within the tree (e.g., - * "src/main/java/MyClass.java"). Output-only. - * - * Generated from protobuf field string path = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $path = ''; - /** - * Output only. The file mode as a string (e.g., "100644"). Indicates file - * type. Output-only. - * - * Generated from protobuf field string mode = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $mode = ''; - /** - * Output only. The size of the object in bytes (only for blobs). Output-only. - * - * Generated from protobuf field int64 size = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Output only. The type of the object (TREE, BLOB, COMMIT). Output-only. - * @type string $sha - * Output only. The SHA-1 hash of the object (unique identifier). Output-only. - * @type string $path - * Output only. The path of the file or directory within the tree (e.g., - * "src/main/java/MyClass.java"). Output-only. - * @type string $mode - * Output only. The file mode as a string (e.g., "100644"). Indicates file - * type. Output-only. - * @type int|string $size - * Output only. The size of the object in bytes (only for blobs). Output-only. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The type of the object (TREE, BLOB, COMMIT). Output-only. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.TreeEntry.ObjectType type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Output only. The type of the object (TREE, BLOB, COMMIT). Output-only. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.TreeEntry.ObjectType type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\SecureSourceManager\V1\TreeEntry\ObjectType::class); - $this->type = $var; - - return $this; - } - - /** - * Output only. The SHA-1 hash of the object (unique identifier). Output-only. - * - * Generated from protobuf field string sha = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSha() - { - return $this->sha; - } - - /** - * Output only. The SHA-1 hash of the object (unique identifier). Output-only. - * - * Generated from protobuf field string sha = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSha($var) - { - GPBUtil::checkString($var, True); - $this->sha = $var; - - return $this; - } - - /** - * Output only. The path of the file or directory within the tree (e.g., - * "src/main/java/MyClass.java"). Output-only. - * - * Generated from protobuf field string path = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Output only. The path of the file or directory within the tree (e.g., - * "src/main/java/MyClass.java"). Output-only. - * - * Generated from protobuf field string path = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - - /** - * Output only. The file mode as a string (e.g., "100644"). Indicates file - * type. Output-only. - * - * Generated from protobuf field string mode = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMode() - { - return $this->mode; - } - - /** - * Output only. The file mode as a string (e.g., "100644"). Indicates file - * type. Output-only. - * - * Generated from protobuf field string mode = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkString($var, True); - $this->mode = $var; - - return $this; - } - - /** - * Output only. The size of the object in bytes (only for blobs). Output-only. - * - * Generated from protobuf field int64 size = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getSize() - { - return $this->size; - } - - /** - * Output only. The size of the object in bytes (only for blobs). Output-only. - * - * Generated from protobuf field int64 size = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setSize($var) - { - GPBUtil::checkInt64($var); - $this->size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/TreeEntry/ObjectType.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/TreeEntry/ObjectType.php deleted file mode 100644 index 443a8d7d7a6b..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/TreeEntry/ObjectType.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.securesourcemanager.v1.TreeEntry.ObjectType - */ -class ObjectType -{ - /** - * Default value, indicating the object type is unspecified. - * - * Generated from protobuf enum OBJECT_TYPE_UNSPECIFIED = 0; - */ - const OBJECT_TYPE_UNSPECIFIED = 0; - /** - * Represents a directory (folder). - * - * Generated from protobuf enum TREE = 1; - */ - const TREE = 1; - /** - * Represents a file (contains file data). - * - * Generated from protobuf enum BLOB = 2; - */ - const BLOB = 2; - /** - * Represents a pointer to another repository (submodule). - * - * Generated from protobuf enum COMMIT = 3; - */ - const COMMIT = 3; - - private static $valueToName = [ - self::OBJECT_TYPE_UNSPECIFIED => 'OBJECT_TYPE_UNSPECIFIED', - self::TREE => 'TREE', - self::BLOB => 'BLOB', - self::COMMIT => 'COMMIT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UnresolvePullRequestCommentsRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UnresolvePullRequestCommentsRequest.php deleted file mode 100644 index 674fee0c8ae2..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UnresolvePullRequestCommentsRequest.php +++ /dev/null @@ -1,180 +0,0 @@ -google.cloud.securesourcemanager.v1.UnresolvePullRequestCommentsRequest - */ -class UnresolvePullRequestCommentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * 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}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * 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. - * - * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $names; - /** - * Optional. If set, at least one comment in a thread is required, rest of the - * comments in the same thread will be automatically updated to unresolved. If - * unset, all comments in the same thread need be present. - * - * Generated from protobuf field bool auto_fill = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $auto_fill = false; - - /** - * @param string $parent 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}` - * Please see {@see SecureSourceManagerClient::pullRequestName()} for help formatting this field. - * @param string[] $names 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. Please see - * {@see SecureSourceManagerClient::pullRequestCommentName()} for help formatting this field. - * - * @return \Google\Cloud\SecureSourceManager\V1\UnresolvePullRequestCommentsRequest - * - * @experimental - */ - public static function build(string $parent, array $names): self - { - return (new self()) - ->setParent($parent) - ->setNames($names); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * 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}` - * @type string[] $names - * 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. - * @type bool $auto_fill - * Optional. If set, at least one comment in a thread is required, rest of the - * comments in the same thread will be automatically updated to unresolved. If - * unset, all comments in the same thread need be present. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * 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}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * 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}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * 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. - * - * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return RepeatedField - */ - public function getNames() - { - return $this->names; - } - - /** - * 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. - * - * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string[] $var - * @return $this - */ - public function setNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->names = $arr; - - return $this; - } - - /** - * Optional. If set, at least one comment in a thread is required, rest of the - * comments in the same thread will be automatically updated to unresolved. If - * unset, all comments in the same thread need be present. - * - * Generated from protobuf field bool auto_fill = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAutoFill() - { - return $this->auto_fill; - } - - /** - * Optional. If set, at least one comment in a thread is required, rest of the - * comments in the same thread will be automatically updated to unresolved. If - * unset, all comments in the same thread need be present. - * - * Generated from protobuf field bool auto_fill = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAutoFill($var) - { - GPBUtil::checkBool($var); - $this->auto_fill = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UnresolvePullRequestCommentsResponse.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UnresolvePullRequestCommentsResponse.php deleted file mode 100644 index ae63d675a94f..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UnresolvePullRequestCommentsResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.securesourcemanager.v1.UnresolvePullRequestCommentsResponse - */ -class UnresolvePullRequestCommentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of pull request comments unresolved. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comments = 1; - */ - private $pull_request_comments; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecureSourceManager\V1\PullRequestComment[] $pull_request_comments - * The list of pull request comments unresolved. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * The list of pull request comments unresolved. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comments = 1; - * @return RepeatedField<\Google\Cloud\SecureSourceManager\V1\PullRequestComment> - */ - public function getPullRequestComments() - { - return $this->pull_request_comments; - } - - /** - * The list of pull request comments unresolved. - * - * Generated from protobuf field repeated .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comments = 1; - * @param \Google\Cloud\SecureSourceManager\V1\PullRequestComment[] $var - * @return $this - */ - public function setPullRequestComments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\SecureSourceManager\V1\PullRequestComment::class); - $this->pull_request_comments = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateBranchRuleRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateBranchRuleRequest.php deleted file mode 100644 index 66109374c7df..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateBranchRuleRequest.php +++ /dev/null @@ -1,187 +0,0 @@ -google.cloud.securesourcemanager.v1.UpdateBranchRuleRequest - */ -class UpdateBranchRuleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field .google.cloud.securesourcemanager.v1.BranchRule branch_rule = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $branch_rule = null; - /** - * Optional. If set, validate the request and preview the review, but do not - * actually post it. (https://google.aip.dev/163, for declarative friendly) - * - * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - /** - * Optional. 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\SecureSourceManager\V1\BranchRule $branchRule - * @param \Google\Protobuf\FieldMask $updateMask Optional. 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. - * - * @return \Google\Cloud\SecureSourceManager\V1\UpdateBranchRuleRequest - * - * @experimental - */ - public static function build(\Google\Cloud\SecureSourceManager\V1\BranchRule $branchRule, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setBranchRule($branchRule) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecureSourceManager\V1\BranchRule $branch_rule - * @type bool $validate_only - * Optional. If set, validate the request and preview the review, but do not - * actually post it. (https://google.aip.dev/163, for declarative friendly) - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. 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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field .google.cloud.securesourcemanager.v1.BranchRule branch_rule = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecureSourceManager\V1\BranchRule|null - */ - public function getBranchRule() - { - return $this->branch_rule; - } - - public function hasBranchRule() - { - return isset($this->branch_rule); - } - - public function clearBranchRule() - { - unset($this->branch_rule); - } - - /** - * Generated from protobuf field .google.cloud.securesourcemanager.v1.BranchRule branch_rule = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecureSourceManager\V1\BranchRule $var - * @return $this - */ - public function setBranchRule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\BranchRule::class); - $this->branch_rule = $var; - - return $this; - } - - /** - * Optional. If set, validate the request and preview the review, but do not - * actually post it. (https://google.aip.dev/163, for declarative friendly) - * - * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. If set, validate the request and preview the review, but do not - * actually post it. (https://google.aip.dev/163, for declarative friendly) - * - * Generated from protobuf field bool validate_only = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * Optional. 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateHookRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateHookRequest.php deleted file mode 100644 index 44200539befc..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateHookRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.securesourcemanager.v1.UpdateHookRequest - */ -class UpdateHookRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. The hook being updated. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Hook hook = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $hook = null; - - /** - * @param \Google\Cloud\SecureSourceManager\V1\Hook $hook Required. The hook being updated. - * @param \Google\Protobuf\FieldMask $updateMask Optional. 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. - * - * @return \Google\Cloud\SecureSourceManager\V1\UpdateHookRequest - * - * @experimental - */ - public static function build(\Google\Cloud\SecureSourceManager\V1\Hook $hook, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setHook($hook) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. 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. - * @type \Google\Cloud\SecureSourceManager\V1\Hook $hook - * Required. The hook being updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Optional. 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The hook being updated. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Hook hook = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecureSourceManager\V1\Hook|null - */ - public function getHook() - { - return $this->hook; - } - - public function hasHook() - { - return isset($this->hook); - } - - public function clearHook() - { - unset($this->hook); - } - - /** - * Required. The hook being updated. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Hook hook = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecureSourceManager\V1\Hook $var - * @return $this - */ - public function setHook($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\Hook::class); - $this->hook = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateIssueCommentRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateIssueCommentRequest.php deleted file mode 100644 index 1ced40e0aebf..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateIssueCommentRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.securesourcemanager.v1.UpdateIssueCommentRequest - */ -class UpdateIssueCommentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The issue comment to update. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.IssueComment issue_comment = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $issue_comment = null; - /** - * 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\SecureSourceManager\V1\IssueComment $issueComment Required. The issue comment to update. - * @param \Google\Protobuf\FieldMask $updateMask 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. - * - * @return \Google\Cloud\SecureSourceManager\V1\UpdateIssueCommentRequest - * - * @experimental - */ - public static function build(\Google\Cloud\SecureSourceManager\V1\IssueComment $issueComment, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setIssueComment($issueComment) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecureSourceManager\V1\IssueComment $issue_comment - * Required. The issue comment to update. - * @type \Google\Protobuf\FieldMask $update_mask - * 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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The issue comment to update. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.IssueComment issue_comment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecureSourceManager\V1\IssueComment|null - */ - public function getIssueComment() - { - return $this->issue_comment; - } - - public function hasIssueComment() - { - return isset($this->issue_comment); - } - - public function clearIssueComment() - { - unset($this->issue_comment); - } - - /** - * Required. The issue comment to update. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.IssueComment issue_comment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecureSourceManager\V1\IssueComment $var - * @return $this - */ - public function setIssueComment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\IssueComment::class); - $this->issue_comment = $var; - - return $this; - } - - /** - * 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateIssueRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateIssueRequest.php deleted file mode 100644 index e6cb4b664442..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateIssueRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.securesourcemanager.v1.UpdateIssueRequest - */ -class UpdateIssueRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The issue to update. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Issue issue = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $issue = null; - /** - * 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\SecureSourceManager\V1\Issue $issue Required. The issue to update. - * @param \Google\Protobuf\FieldMask $updateMask 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. - * - * @return \Google\Cloud\SecureSourceManager\V1\UpdateIssueRequest - * - * @experimental - */ - public static function build(\Google\Cloud\SecureSourceManager\V1\Issue $issue, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setIssue($issue) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecureSourceManager\V1\Issue $issue - * Required. The issue to update. - * @type \Google\Protobuf\FieldMask $update_mask - * 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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The issue to update. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Issue issue = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecureSourceManager\V1\Issue|null - */ - public function getIssue() - { - return $this->issue; - } - - public function hasIssue() - { - return isset($this->issue); - } - - public function clearIssue() - { - unset($this->issue); - } - - /** - * Required. The issue to update. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Issue issue = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecureSourceManager\V1\Issue $var - * @return $this - */ - public function setIssue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\Issue::class); - $this->issue = $var; - - return $this; - } - - /** - * 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdatePullRequestCommentRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdatePullRequestCommentRequest.php deleted file mode 100644 index 48157c757576..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdatePullRequestCommentRequest.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.securesourcemanager.v1.UpdatePullRequestCommentRequest - */ -class UpdatePullRequestCommentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The pull request comment to update. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comment = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $pull_request_comment = null; - /** - * 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`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\SecureSourceManager\V1\PullRequestComment $pullRequestComment Required. The pull request comment to update. - * @param \Google\Protobuf\FieldMask $updateMask 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`. - * - * @return \Google\Cloud\SecureSourceManager\V1\UpdatePullRequestCommentRequest - * - * @experimental - */ - public static function build(\Google\Cloud\SecureSourceManager\V1\PullRequestComment $pullRequestComment, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setPullRequestComment($pullRequestComment) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecureSourceManager\V1\PullRequestComment $pull_request_comment - * Required. The pull request comment to update. - * @type \Google\Protobuf\FieldMask $update_mask - * 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`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The pull request comment to update. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecureSourceManager\V1\PullRequestComment|null - */ - public function getPullRequestComment() - { - return $this->pull_request_comment; - } - - public function hasPullRequestComment() - { - return isset($this->pull_request_comment); - } - - public function clearPullRequestComment() - { - unset($this->pull_request_comment); - } - - /** - * Required. The pull request comment to update. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequestComment pull_request_comment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecureSourceManager\V1\PullRequestComment $var - * @return $this - */ - public function setPullRequestComment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\PullRequestComment::class); - $this->pull_request_comment = $var; - - return $this; - } - - /** - * 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`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * 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`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdatePullRequestRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdatePullRequestRequest.php deleted file mode 100644 index 583588f754bc..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdatePullRequestRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.securesourcemanager.v1.UpdatePullRequestRequest - */ -class UpdatePullRequestRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The pull request to update. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest pull_request = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $pull_request = null; - /** - * 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\SecureSourceManager\V1\PullRequest $pullRequest Required. The pull request to update. - * @param \Google\Protobuf\FieldMask $updateMask 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. - * - * @return \Google\Cloud\SecureSourceManager\V1\UpdatePullRequestRequest - * - * @experimental - */ - public static function build(\Google\Cloud\SecureSourceManager\V1\PullRequest $pullRequest, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setPullRequest($pullRequest) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\SecureSourceManager\V1\PullRequest $pull_request - * Required. The pull request to update. - * @type \Google\Protobuf\FieldMask $update_mask - * 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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * Required. The pull request to update. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest pull_request = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecureSourceManager\V1\PullRequest|null - */ - public function getPullRequest() - { - return $this->pull_request; - } - - public function hasPullRequest() - { - return isset($this->pull_request); - } - - public function clearPullRequest() - { - unset($this->pull_request); - } - - /** - * Required. The pull request to update. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.PullRequest pull_request = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecureSourceManager\V1\PullRequest $var - * @return $this - */ - public function setPullRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\PullRequest::class); - $this->pull_request = $var; - - return $this; - } - - /** - * 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateRepositoryRequest.php b/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateRepositoryRequest.php deleted file mode 100644 index 252ac6de495b..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/proto/src/Google/Cloud/SecureSourceManager/V1/UpdateRepositoryRequest.php +++ /dev/null @@ -1,194 +0,0 @@ -google.cloud.securesourcemanager.v1.UpdateRepositoryRequest - */ -class UpdateRepositoryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. The repository being updated. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Repository repository = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $repository = null; - /** - * Optional. False by default. If set to true, the request is validated and - * the user is provided with an expected result, but no actual change is made. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\SecureSourceManager\V1\Repository $repository Required. The repository being updated. - * @param \Google\Protobuf\FieldMask $updateMask 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. - * - * @return \Google\Cloud\SecureSourceManager\V1\UpdateRepositoryRequest - * - * @experimental - */ - public static function build(\Google\Cloud\SecureSourceManager\V1\Repository $repository, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setRepository($repository) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * 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. - * @type \Google\Cloud\SecureSourceManager\V1\Repository $repository - * Required. The repository being updated. - * @type bool $validate_only - * Optional. False by default. If set to true, the request is validated and - * the user is provided with an expected result, but no actual change is made. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Securesourcemanager\V1\SecureSourceManager::initOnce(); - parent::__construct($data); - } - - /** - * 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * 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. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The repository being updated. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Repository repository = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\SecureSourceManager\V1\Repository|null - */ - public function getRepository() - { - return $this->repository; - } - - public function hasRepository() - { - return isset($this->repository); - } - - public function clearRepository() - { - unset($this->repository); - } - - /** - * Required. The repository being updated. - * - * Generated from protobuf field .google.cloud.securesourcemanager.v1.Repository repository = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\SecureSourceManager\V1\Repository $var - * @return $this - */ - public function setRepository($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\SecureSourceManager\V1\Repository::class); - $this->repository = $var; - - return $this; - } - - /** - * Optional. False by default. If set to true, the request is validated and - * the user is provided with an expected result, but no actual change is made. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * Optional. False by default. If set to true, the request is validated and - * the user is provided with an expected result, but no actual change is made. - * - * Generated from protobuf field bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/batch_create_pull_request_comments.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/batch_create_pull_request_comments.php deleted file mode 100644 index 911390e7f454..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/batch_create_pull_request_comments.php +++ /dev/null @@ -1,114 +0,0 @@ -setParent($formattedRequestsParent) - ->setPullRequestComment($requestsPullRequestComment); - $requests = [$createPullRequestCommentRequest,]; - $request = (new BatchCreatePullRequestCommentsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->batchCreatePullRequestComments($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BatchCreatePullRequestCommentsResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SecureSourceManagerClient::pullRequestName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]', - '[PULL_REQUEST]' - ); - $formattedRequestsParent = SecureSourceManagerClient::pullRequestName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]', - '[PULL_REQUEST]' - ); - - batch_create_pull_request_comments_sample($formattedParent, $formattedRequestsParent); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_BatchCreatePullRequestComments_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/close_issue.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/close_issue.php deleted file mode 100644 index 123dc716d02b..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/close_issue.php +++ /dev/null @@ -1,90 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->closeIssue($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Issue $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SecureSourceManagerClient::issueName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]', - '[ISSUE]' - ); - - close_issue_sample($formattedName); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_CloseIssue_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/close_pull_request.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/close_pull_request.php deleted file mode 100644 index 9a6eefc11b0e..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/close_pull_request.php +++ /dev/null @@ -1,90 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->closePullRequest($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PullRequest $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SecureSourceManagerClient::pullRequestName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]', - '[PULL_REQUEST]' - ); - - close_pull_request_sample($formattedName); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_ClosePullRequest_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_branch_rule.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_branch_rule.php deleted file mode 100644 index b91b47c680ff..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_branch_rule.php +++ /dev/null @@ -1,91 +0,0 @@ -setParent($formattedParent) - ->setBranchRule($branchRule) - ->setBranchRuleId($branchRuleId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->createBranchRule($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BranchRule $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SecureSourceManagerClient::repositoryName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]' - ); - $branchRuleId = '[BRANCH_RULE_ID]'; - - create_branch_rule_sample($formattedParent, $branchRuleId); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_CreateBranchRule_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_hook.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_hook.php deleted file mode 100644 index 5ffe52c6e2e3..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_hook.php +++ /dev/null @@ -1,100 +0,0 @@ -setTargetUri($hookTargetUri); - $request = (new CreateHookRequest()) - ->setParent($formattedParent) - ->setHook($hook) - ->setHookId($hookId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->createHook($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Hook $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SecureSourceManagerClient::repositoryName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]' - ); - $hookTargetUri = '[TARGET_URI]'; - $hookId = '[HOOK_ID]'; - - create_hook_sample($formattedParent, $hookTargetUri, $hookId); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_CreateHook_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_instance.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_instance.php deleted file mode 100644 index a072ad05cfb7..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_instance.php +++ /dev/null @@ -1,88 +0,0 @@ -setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->createInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SecureSourceManagerClient::locationName('[PROJECT]', '[LOCATION]'); - $instanceId = '[INSTANCE_ID]'; - - create_instance_sample($formattedParent, $instanceId); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_CreateInstance_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_issue.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_issue.php deleted file mode 100644 index adaba0b7d41f..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_issue.php +++ /dev/null @@ -1,93 +0,0 @@ -setTitle($issueTitle); - $request = (new CreateIssueRequest()) - ->setParent($formattedParent) - ->setIssue($issue); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->createIssue($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Issue $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SecureSourceManagerClient::repositoryName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]' - ); - $issueTitle = '[TITLE]'; - - create_issue_sample($formattedParent, $issueTitle); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_CreateIssue_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_issue_comment.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_issue_comment.php deleted file mode 100644 index 67a807c965e7..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_issue_comment.php +++ /dev/null @@ -1,94 +0,0 @@ -setBody($issueCommentBody); - $request = (new CreateIssueCommentRequest()) - ->setParent($formattedParent) - ->setIssueComment($issueComment); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->createIssueComment($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var IssueComment $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SecureSourceManagerClient::issueName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]', - '[ISSUE]' - ); - $issueCommentBody = '[BODY]'; - - create_issue_comment_sample($formattedParent, $issueCommentBody); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_CreateIssueComment_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_pull_request.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_pull_request.php deleted file mode 100644 index ed8d69bcc4c3..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_pull_request.php +++ /dev/null @@ -1,102 +0,0 @@ -setRef($pullRequestBaseRef); - $pullRequest = (new PullRequest()) - ->setTitle($pullRequestTitle) - ->setBase($pullRequestBase); - $request = (new CreatePullRequestRequest()) - ->setParent($formattedParent) - ->setPullRequest($pullRequest); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->createPullRequest($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PullRequest $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SecureSourceManagerClient::repositoryName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]' - ); - $pullRequestTitle = '[TITLE]'; - $pullRequestBaseRef = '[REF]'; - - create_pull_request_sample($formattedParent, $pullRequestTitle, $pullRequestBaseRef); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_CreatePullRequest_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_pull_request_comment.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_pull_request_comment.php deleted file mode 100644 index 7880d5fefc40..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_pull_request_comment.php +++ /dev/null @@ -1,96 +0,0 @@ -setParent($formattedParent) - ->setPullRequestComment($pullRequestComment); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->createPullRequestComment($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PullRequestComment $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SecureSourceManagerClient::pullRequestName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]', - '[PULL_REQUEST]' - ); - - create_pull_request_comment_sample($formattedParent); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_CreatePullRequestComment_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_repository.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_repository.php deleted file mode 100644 index 6d9dc7c3222c..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/create_repository.php +++ /dev/null @@ -1,94 +0,0 @@ -setParent($formattedParent) - ->setRepository($repository) - ->setRepositoryId($repositoryId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->createRepository($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Repository $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SecureSourceManagerClient::locationName('[PROJECT]', '[LOCATION]'); - $repositoryId = '[REPOSITORY_ID]'; - - create_repository_sample($formattedParent, $repositoryId); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_CreateRepository_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_branch_rule.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_branch_rule.php deleted file mode 100644 index 21f582de10a1..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_branch_rule.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->deleteBranchRule($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SecureSourceManagerClient::branchRuleName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]', - '[BRANCH_RULE]' - ); - - delete_branch_rule_sample($formattedName); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_DeleteBranchRule_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_hook.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_hook.php deleted file mode 100644 index 665e01c72b42..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_hook.php +++ /dev/null @@ -1,87 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->deleteHook($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SecureSourceManagerClient::hookName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]', - '[HOOK]' - ); - - delete_hook_sample($formattedName); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_DeleteHook_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_instance.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_instance.php deleted file mode 100644 index a02b42a77440..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_instance.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->deleteInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SecureSourceManagerClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - delete_instance_sample($formattedName); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_DeleteInstance_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_issue.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_issue.php deleted file mode 100644 index b51889af2143..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_issue.php +++ /dev/null @@ -1,87 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->deleteIssue($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SecureSourceManagerClient::issueName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]', - '[ISSUE]' - ); - - delete_issue_sample($formattedName); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_DeleteIssue_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_issue_comment.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_issue_comment.php deleted file mode 100644 index 6cfed6d9cde3..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_issue_comment.php +++ /dev/null @@ -1,88 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->deleteIssueComment($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SecureSourceManagerClient::issueCommentName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]', - '[ISSUE]', - '[COMMENT]' - ); - - delete_issue_comment_sample($formattedName); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_DeleteIssueComment_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_pull_request_comment.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_pull_request_comment.php deleted file mode 100644 index 1b0e7edf3f12..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_pull_request_comment.php +++ /dev/null @@ -1,88 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->deletePullRequestComment($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SecureSourceManagerClient::pullRequestCommentName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]', - '[PULL_REQUEST]', - '[COMMENT]' - ); - - delete_pull_request_comment_sample($formattedName); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_DeletePullRequestComment_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_repository.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_repository.php deleted file mode 100644 index 461a68a6ded3..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/delete_repository.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->deleteRepository($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SecureSourceManagerClient::repositoryName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]' - ); - - delete_repository_sample($formattedName); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_DeleteRepository_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/fetch_blob.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/fetch_blob.php deleted file mode 100644 index ba21bb7a9139..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/fetch_blob.php +++ /dev/null @@ -1,80 +0,0 @@ -setRepository($formattedRepository) - ->setSha($sha); - - // Call the API and handle any network failures. - try { - /** @var FetchBlobResponse $response */ - $response = $secureSourceManagerClient->fetchBlob($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedRepository = SecureSourceManagerClient::repositoryName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]' - ); - $sha = '[SHA]'; - - fetch_blob_sample($formattedRepository, $sha); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_FetchBlob_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/fetch_tree.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/fetch_tree.php deleted file mode 100644 index a1d583e4537e..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/fetch_tree.php +++ /dev/null @@ -1,82 +0,0 @@ -setRepository($formattedRepository); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $secureSourceManagerClient->fetchTree($request); - - /** @var TreeEntry $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedRepository = SecureSourceManagerClient::repositoryName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]' - ); - - fetch_tree_sample($formattedRepository); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_FetchTree_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_branch_rule.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_branch_rule.php deleted file mode 100644 index 9b4ca160f7ab..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_branch_rule.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var BranchRule $response */ - $response = $secureSourceManagerClient->getBranchRule($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SecureSourceManagerClient::branchRuleName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]', - '[BRANCH_RULE]' - ); - - get_branch_rule_sample($formattedName); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_GetBranchRule_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_hook.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_hook.php deleted file mode 100644 index 51835c9df3d2..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_hook.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Hook $response */ - $response = $secureSourceManagerClient->getHook($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SecureSourceManagerClient::hookName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]', - '[HOOK]' - ); - - get_hook_sample($formattedName); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_GetHook_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_iam_policy.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_iam_policy.php deleted file mode 100644 index 4f50b96d0eef..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $secureSourceManagerClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_GetIamPolicy_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_iam_policy_repo.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_iam_policy_repo.php deleted file mode 100644 index 48a586cc0406..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_iam_policy_repo.php +++ /dev/null @@ -1,71 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $secureSourceManagerClient->getIamPolicyRepo($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_repo_sample($resource); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_GetIamPolicyRepo_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_instance.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_instance.php deleted file mode 100644 index 8ba4d2c69111..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_instance.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Instance $response */ - $response = $secureSourceManagerClient->getInstance($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SecureSourceManagerClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - get_instance_sample($formattedName); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_GetInstance_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_issue.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_issue.php deleted file mode 100644 index 1002881fb44e..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_issue.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Issue $response */ - $response = $secureSourceManagerClient->getIssue($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SecureSourceManagerClient::issueName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]', - '[ISSUE]' - ); - - get_issue_sample($formattedName); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_GetIssue_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_issue_comment.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_issue_comment.php deleted file mode 100644 index 4f6ea57f3c3f..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_issue_comment.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var IssueComment $response */ - $response = $secureSourceManagerClient->getIssueComment($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SecureSourceManagerClient::issueCommentName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]', - '[ISSUE]', - '[COMMENT]' - ); - - get_issue_comment_sample($formattedName); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_GetIssueComment_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_location.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_location.php deleted file mode 100644 index baab9940be14..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END securesourcemanager_v1_generated_SecureSourceManager_GetLocation_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_pull_request.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_pull_request.php deleted file mode 100644 index 390f35cfef81..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_pull_request.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PullRequest $response */ - $response = $secureSourceManagerClient->getPullRequest($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SecureSourceManagerClient::pullRequestName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]', - '[PULL_REQUEST]' - ); - - get_pull_request_sample($formattedName); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_GetPullRequest_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_pull_request_comment.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_pull_request_comment.php deleted file mode 100644 index 1c608fca77cb..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_pull_request_comment.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PullRequestComment $response */ - $response = $secureSourceManagerClient->getPullRequestComment($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SecureSourceManagerClient::pullRequestCommentName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]', - '[PULL_REQUEST]', - '[COMMENT]' - ); - - get_pull_request_comment_sample($formattedName); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_GetPullRequestComment_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_repository.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_repository.php deleted file mode 100644 index 79fd829beef3..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/get_repository.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Repository $response */ - $response = $secureSourceManagerClient->getRepository($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SecureSourceManagerClient::repositoryName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]' - ); - - get_repository_sample($formattedName); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_GetRepository_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_branch_rules.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_branch_rules.php deleted file mode 100644 index 18b662a74bf5..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_branch_rules.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $secureSourceManagerClient->listBranchRules($request); - - /** @var BranchRule $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SecureSourceManagerClient::repositoryName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]' - ); - - list_branch_rules_sample($formattedParent); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_ListBranchRules_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_hooks.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_hooks.php deleted file mode 100644 index da7a80f1b960..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_hooks.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $secureSourceManagerClient->listHooks($request); - - /** @var Hook $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SecureSourceManagerClient::repositoryName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]' - ); - - list_hooks_sample($formattedParent); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_ListHooks_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_instances.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_instances.php deleted file mode 100644 index 3a552de67fd6..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_instances.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $secureSourceManagerClient->listInstances($request); - - /** @var Instance $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SecureSourceManagerClient::locationName('[PROJECT]', '[LOCATION]'); - - list_instances_sample($formattedParent); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_ListInstances_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_issue_comments.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_issue_comments.php deleted file mode 100644 index b779e4bcf516..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_issue_comments.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $secureSourceManagerClient->listIssueComments($request); - - /** @var IssueComment $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SecureSourceManagerClient::issueName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]', - '[ISSUE]' - ); - - list_issue_comments_sample($formattedParent); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_ListIssueComments_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_issues.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_issues.php deleted file mode 100644 index b6f802f608d4..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_issues.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $secureSourceManagerClient->listIssues($request); - - /** @var Issue $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SecureSourceManagerClient::repositoryName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]' - ); - - list_issues_sample($formattedParent); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_ListIssues_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_locations.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_locations.php deleted file mode 100644 index 6942535f43ca..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_locations.php +++ /dev/null @@ -1,78 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END securesourcemanager_v1_generated_SecureSourceManager_ListLocations_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_pull_request_comments.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_pull_request_comments.php deleted file mode 100644 index 08f37aaf7345..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_pull_request_comments.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $secureSourceManagerClient->listPullRequestComments($request); - - /** @var PullRequestComment $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SecureSourceManagerClient::pullRequestName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]', - '[PULL_REQUEST]' - ); - - list_pull_request_comments_sample($formattedParent); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_ListPullRequestComments_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_pull_request_file_diffs.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_pull_request_file_diffs.php deleted file mode 100644 index 534ac69419f4..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_pull_request_file_diffs.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $secureSourceManagerClient->listPullRequestFileDiffs($request); - - /** @var FileDiff $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SecureSourceManagerClient::pullRequestName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]', - '[PULL_REQUEST]' - ); - - list_pull_request_file_diffs_sample($formattedName); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_ListPullRequestFileDiffs_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_pull_requests.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_pull_requests.php deleted file mode 100644 index 7bf83267880c..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_pull_requests.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $secureSourceManagerClient->listPullRequests($request); - - /** @var PullRequest $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SecureSourceManagerClient::repositoryName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]' - ); - - list_pull_requests_sample($formattedParent); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_ListPullRequests_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_repositories.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_repositories.php deleted file mode 100644 index 5aa8882c10d0..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/list_repositories.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $secureSourceManagerClient->listRepositories($request); - - /** @var Repository $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SecureSourceManagerClient::locationName('[PROJECT]', '[LOCATION]'); - - list_repositories_sample($formattedParent); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_ListRepositories_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/merge_pull_request.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/merge_pull_request.php deleted file mode 100644 index d863f37fd979..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/merge_pull_request.php +++ /dev/null @@ -1,90 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->mergePullRequest($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PullRequest $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SecureSourceManagerClient::pullRequestName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]', - '[PULL_REQUEST]' - ); - - merge_pull_request_sample($formattedName); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_MergePullRequest_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/open_issue.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/open_issue.php deleted file mode 100644 index 97dabcb10a5d..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/open_issue.php +++ /dev/null @@ -1,90 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->openIssue($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Issue $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SecureSourceManagerClient::issueName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]', - '[ISSUE]' - ); - - open_issue_sample($formattedName); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_OpenIssue_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/open_pull_request.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/open_pull_request.php deleted file mode 100644 index cc4e709008ef..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/open_pull_request.php +++ /dev/null @@ -1,90 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->openPullRequest($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PullRequest $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SecureSourceManagerClient::pullRequestName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]', - '[PULL_REQUEST]' - ); - - open_pull_request_sample($formattedName); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_OpenPullRequest_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/resolve_pull_request_comments.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/resolve_pull_request_comments.php deleted file mode 100644 index 8fac5736ff49..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/resolve_pull_request_comments.php +++ /dev/null @@ -1,108 +0,0 @@ -setParent($formattedParent) - ->setNames($formattedNames); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->resolvePullRequestComments($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ResolvePullRequestCommentsResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SecureSourceManagerClient::pullRequestName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]', - '[PULL_REQUEST]' - ); - $formattedNamesElement = SecureSourceManagerClient::pullRequestCommentName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]', - '[PULL_REQUEST]', - '[COMMENT]' - ); - - resolve_pull_request_comments_sample($formattedParent, $formattedNamesElement); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_ResolvePullRequestComments_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/set_iam_policy.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/set_iam_policy.php deleted file mode 100644 index 8118ad8ac590..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $secureSourceManagerClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_SetIamPolicy_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/set_iam_policy_repo.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/set_iam_policy_repo.php deleted file mode 100644 index 9df5a3827eef..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/set_iam_policy_repo.php +++ /dev/null @@ -1,73 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $secureSourceManagerClient->setIamPolicyRepo($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_repo_sample($resource); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_SetIamPolicyRepo_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/test_iam_permissions.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/test_iam_permissions.php deleted file mode 100644 index e1ee75655f98..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $secureSourceManagerClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_TestIamPermissions_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/test_iam_permissions_repo.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/test_iam_permissions_repo.php deleted file mode 100644 index 6b021a9b35f4..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/test_iam_permissions_repo.php +++ /dev/null @@ -1,79 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $secureSourceManagerClient->testIamPermissionsRepo($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_repo_sample($resource, $permissionsElement); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_TestIamPermissionsRepo_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/unresolve_pull_request_comments.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/unresolve_pull_request_comments.php deleted file mode 100644 index 2653e0e33d58..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/unresolve_pull_request_comments.php +++ /dev/null @@ -1,108 +0,0 @@ -setParent($formattedParent) - ->setNames($formattedNames); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->unresolvePullRequestComments($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var UnresolvePullRequestCommentsResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SecureSourceManagerClient::pullRequestName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]', - '[PULL_REQUEST]' - ); - $formattedNamesElement = SecureSourceManagerClient::pullRequestCommentName( - '[PROJECT]', - '[LOCATION]', - '[REPOSITORY]', - '[PULL_REQUEST]', - '[COMMENT]' - ); - - unresolve_pull_request_comments_sample($formattedParent, $formattedNamesElement); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_UnresolvePullRequestComments_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_branch_rule.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_branch_rule.php deleted file mode 100644 index 6c6fa4b2cfd1..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_branch_rule.php +++ /dev/null @@ -1,71 +0,0 @@ -setBranchRule($branchRule); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->updateBranchRule($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BranchRule $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END securesourcemanager_v1_generated_SecureSourceManager_UpdateBranchRule_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_hook.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_hook.php deleted file mode 100644 index 1abd8eeb0951..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_hook.php +++ /dev/null @@ -1,84 +0,0 @@ -setTargetUri($hookTargetUri); - $request = (new UpdateHookRequest()) - ->setHook($hook); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->updateHook($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Hook $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $hookTargetUri = '[TARGET_URI]'; - - update_hook_sample($hookTargetUri); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_UpdateHook_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_issue.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_issue.php deleted file mode 100644 index a69bed84bfad..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_issue.php +++ /dev/null @@ -1,84 +0,0 @@ -setTitle($issueTitle); - $request = (new UpdateIssueRequest()) - ->setIssue($issue); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->updateIssue($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Issue $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $issueTitle = '[TITLE]'; - - update_issue_sample($issueTitle); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_UpdateIssue_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_issue_comment.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_issue_comment.php deleted file mode 100644 index 90292c11d340..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_issue_comment.php +++ /dev/null @@ -1,84 +0,0 @@ -setBody($issueCommentBody); - $request = (new UpdateIssueCommentRequest()) - ->setIssueComment($issueComment); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->updateIssueComment($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var IssueComment $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $issueCommentBody = '[BODY]'; - - update_issue_comment_sample($issueCommentBody); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_UpdateIssueComment_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_pull_request.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_pull_request.php deleted file mode 100644 index 956f7fbc248b..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_pull_request.php +++ /dev/null @@ -1,90 +0,0 @@ -setRef($pullRequestBaseRef); - $pullRequest = (new PullRequest()) - ->setTitle($pullRequestTitle) - ->setBase($pullRequestBase); - $request = (new UpdatePullRequestRequest()) - ->setPullRequest($pullRequest); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->updatePullRequest($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PullRequest $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $pullRequestTitle = '[TITLE]'; - $pullRequestBaseRef = '[REF]'; - - update_pull_request_sample($pullRequestTitle, $pullRequestBaseRef); -} -// [END securesourcemanager_v1_generated_SecureSourceManager_UpdatePullRequest_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_pull_request_comment.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_pull_request_comment.php deleted file mode 100644 index 332cd16fe5c5..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_pull_request_comment.php +++ /dev/null @@ -1,71 +0,0 @@ -setPullRequestComment($pullRequestComment); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->updatePullRequestComment($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PullRequestComment $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END securesourcemanager_v1_generated_SecureSourceManager_UpdatePullRequestComment_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_repository.php b/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_repository.php deleted file mode 100644 index dcfd23030465..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/samples/V1/SecureSourceManagerClient/update_repository.php +++ /dev/null @@ -1,71 +0,0 @@ -setRepository($repository); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $secureSourceManagerClient->updateRepository($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Repository $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END securesourcemanager_v1_generated_SecureSourceManager_UpdateRepository_sync] diff --git a/owl-bot-staging/SecureSourceManager/v1/src/V1/Client/SecureSourceManagerClient.php b/owl-bot-staging/SecureSourceManager/v1/src/V1/Client/SecureSourceManagerClient.php deleted file mode 100644 index 24a8f0c5a059..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/src/V1/Client/SecureSourceManagerClient.php +++ /dev/null @@ -1,2192 +0,0 @@ - batchCreatePullRequestCommentsAsync(BatchCreatePullRequestCommentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface closeIssueAsync(CloseIssueRequest $request, array $optionalArgs = []) - * @method PromiseInterface closePullRequestAsync(ClosePullRequestRequest $request, array $optionalArgs = []) - * @method PromiseInterface createBranchRuleAsync(CreateBranchRuleRequest $request, array $optionalArgs = []) - * @method PromiseInterface createHookAsync(CreateHookRequest $request, array $optionalArgs = []) - * @method PromiseInterface createInstanceAsync(CreateInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface createIssueAsync(CreateIssueRequest $request, array $optionalArgs = []) - * @method PromiseInterface createIssueCommentAsync(CreateIssueCommentRequest $request, array $optionalArgs = []) - * @method PromiseInterface createPullRequestAsync(CreatePullRequestRequest $request, array $optionalArgs = []) - * @method PromiseInterface createPullRequestCommentAsync(CreatePullRequestCommentRequest $request, array $optionalArgs = []) - * @method PromiseInterface createRepositoryAsync(CreateRepositoryRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteBranchRuleAsync(DeleteBranchRuleRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteHookAsync(DeleteHookRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteInstanceAsync(DeleteInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteIssueAsync(DeleteIssueRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteIssueCommentAsync(DeleteIssueCommentRequest $request, array $optionalArgs = []) - * @method PromiseInterface deletePullRequestCommentAsync(DeletePullRequestCommentRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteRepositoryAsync(DeleteRepositoryRequest $request, array $optionalArgs = []) - * @method PromiseInterface fetchBlobAsync(FetchBlobRequest $request, array $optionalArgs = []) - * @method PromiseInterface fetchTreeAsync(FetchTreeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBranchRuleAsync(GetBranchRuleRequest $request, array $optionalArgs = []) - * @method PromiseInterface getHookAsync(GetHookRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyRepoAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getInstanceAsync(GetInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIssueAsync(GetIssueRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIssueCommentAsync(GetIssueCommentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getPullRequestAsync(GetPullRequestRequest $request, array $optionalArgs = []) - * @method PromiseInterface getPullRequestCommentAsync(GetPullRequestCommentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getRepositoryAsync(GetRepositoryRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBranchRulesAsync(ListBranchRulesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listHooksAsync(ListHooksRequest $request, array $optionalArgs = []) - * @method PromiseInterface listInstancesAsync(ListInstancesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listIssueCommentsAsync(ListIssueCommentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listIssuesAsync(ListIssuesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listPullRequestCommentsAsync(ListPullRequestCommentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listPullRequestFileDiffsAsync(ListPullRequestFileDiffsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listPullRequestsAsync(ListPullRequestsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listRepositoriesAsync(ListRepositoriesRequest $request, array $optionalArgs = []) - * @method PromiseInterface mergePullRequestAsync(MergePullRequestRequest $request, array $optionalArgs = []) - * @method PromiseInterface openIssueAsync(OpenIssueRequest $request, array $optionalArgs = []) - * @method PromiseInterface openPullRequestAsync(OpenPullRequestRequest $request, array $optionalArgs = []) - * @method PromiseInterface resolvePullRequestCommentsAsync(ResolvePullRequestCommentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyRepoAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsRepoAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface unresolvePullRequestCommentsAsync(UnresolvePullRequestCommentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateBranchRuleAsync(UpdateBranchRuleRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateHookAsync(UpdateHookRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateIssueAsync(UpdateIssueRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateIssueCommentAsync(UpdateIssueCommentRequest $request, array $optionalArgs = []) - * @method PromiseInterface updatePullRequestAsync(UpdatePullRequestRequest $request, array $optionalArgs = []) - * @method PromiseInterface updatePullRequestCommentAsync(UpdatePullRequestCommentRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateRepositoryAsync(UpdateRepositoryRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class SecureSourceManagerClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.securesourcemanager.v1.SecureSourceManager'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'securesourcemanager.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'securesourcemanager.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/secure_source_manager_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/secure_source_manager_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/secure_source_manager_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/secure_source_manager_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a branch_rule - * resource. - * - * @param string $project - * @param string $location - * @param string $repository - * @param string $branchRule - * - * @return string The formatted branch_rule resource. - */ - public static function branchRuleName(string $project, string $location, string $repository, string $branchRule): string - { - return self::getPathTemplate('branchRule')->render([ - 'project' => $project, - 'location' => $location, - 'repository' => $repository, - 'branch_rule' => $branchRule, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a ca_pool - * resource. - * - * @param string $project - * @param string $location - * @param string $caPool - * - * @return string The formatted ca_pool resource. - */ - public static function caPoolName(string $project, string $location, string $caPool): string - { - return self::getPathTemplate('caPool')->render([ - 'project' => $project, - 'location' => $location, - 'ca_pool' => $caPool, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a crypto_key - * resource. - * - * @param string $project - * @param string $location - * @param string $keyRing - * @param string $cryptoKey - * - * @return string The formatted crypto_key resource. - */ - public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string - { - return self::getPathTemplate('cryptoKey')->render([ - 'project' => $project, - 'location' => $location, - 'key_ring' => $keyRing, - 'crypto_key' => $cryptoKey, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a hook - * resource. - * - * @param string $project - * @param string $location - * @param string $repository - * @param string $hook - * - * @return string The formatted hook resource. - */ - public static function hookName(string $project, string $location, string $repository, string $hook): string - { - return self::getPathTemplate('hook')->render([ - 'project' => $project, - 'location' => $location, - 'repository' => $repository, - 'hook' => $hook, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a instance - * resource. - * - * @param string $project - * @param string $location - * @param string $instance - * - * @return string The formatted instance resource. - */ - public static function instanceName(string $project, string $location, string $instance): string - { - return self::getPathTemplate('instance')->render([ - 'project' => $project, - 'location' => $location, - 'instance' => $instance, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a issue - * resource. - * - * @param string $project - * @param string $location - * @param string $repository - * @param string $issue - * - * @return string The formatted issue resource. - */ - public static function issueName(string $project, string $location, string $repository, string $issue): string - { - return self::getPathTemplate('issue')->render([ - 'project' => $project, - 'location' => $location, - 'repository' => $repository, - 'issue' => $issue, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * issue_comment resource. - * - * @param string $project - * @param string $location - * @param string $repository - * @param string $issue - * @param string $comment - * - * @return string The formatted issue_comment resource. - */ - public static function issueCommentName(string $project, string $location, string $repository, string $issue, string $comment): string - { - return self::getPathTemplate('issueComment')->render([ - 'project' => $project, - 'location' => $location, - 'repository' => $repository, - 'issue' => $issue, - 'comment' => $comment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a pull_request - * resource. - * - * @param string $project - * @param string $location - * @param string $repository - * @param string $pullRequest - * - * @return string The formatted pull_request resource. - */ - public static function pullRequestName(string $project, string $location, string $repository, string $pullRequest): string - { - return self::getPathTemplate('pullRequest')->render([ - 'project' => $project, - 'location' => $location, - 'repository' => $repository, - 'pull_request' => $pullRequest, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * pull_request_comment resource. - * - * @param string $project - * @param string $location - * @param string $repository - * @param string $pullRequest - * @param string $comment - * - * @return string The formatted pull_request_comment resource. - */ - public static function pullRequestCommentName(string $project, string $location, string $repository, string $pullRequest, string $comment): string - { - return self::getPathTemplate('pullRequestComment')->render([ - 'project' => $project, - 'location' => $location, - 'repository' => $repository, - 'pull_request' => $pullRequest, - 'comment' => $comment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a repository - * resource. - * - * @param string $project - * @param string $location - * @param string $repository - * - * @return string The formatted repository resource. - */ - public static function repositoryName(string $project, string $location, string $repository): string - { - return self::getPathTemplate('repository')->render([ - 'project' => $project, - 'location' => $location, - 'repository' => $repository, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * service_attachment resource. - * - * @param string $project - * @param string $region - * @param string $serviceAttachment - * - * @return string The formatted service_attachment resource. - */ - public static function serviceAttachmentName(string $project, string $region, string $serviceAttachment): string - { - return self::getPathTemplate('serviceAttachment')->render([ - 'project' => $project, - 'region' => $region, - 'service_attachment' => $serviceAttachment, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - branchRule: projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule} - * - caPool: projects/{project}/locations/{location}/caPools/{ca_pool} - * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} - * - hook: projects/{project}/locations/{location}/repositories/{repository}/hooks/{hook} - * - instance: projects/{project}/locations/{location}/instances/{instance} - * - issue: projects/{project}/locations/{location}/repositories/{repository}/issues/{issue} - * - issueComment: projects/{project}/locations/{location}/repositories/{repository}/issues/{issue}/issueComments/{comment} - * - location: projects/{project}/locations/{location} - * - pullRequest: projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request} - * - pullRequestComment: projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}/pullRequestComments/{comment} - * - repository: projects/{project}/locations/{location}/repositories/{repository} - * - serviceAttachment: projects/{project}/regions/{region}/serviceAttachments/{service_attachment} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'securesourcemanager.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\SecureSourceManager\V1\SecureSourceManagerClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new SecureSourceManagerClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Batch creates pull request comments. This function is used to create - * multiple PullRequestComments for code review. There needs to be exactly one - * PullRequestComment of type Review, and at most 100 PullRequestComments of - * type Code per request. The Position of the code comments must be unique - * within the request. - * - * The async variant is - * {@see SecureSourceManagerClient::batchCreatePullRequestCommentsAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/batch_create_pull_request_comments.php - * - * @param BatchCreatePullRequestCommentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function batchCreatePullRequestComments(BatchCreatePullRequestCommentsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('BatchCreatePullRequestComments', $request, $callOptions)->wait(); - } - - /** - * Closes an issue. - * - * The async variant is {@see SecureSourceManagerClient::closeIssueAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/close_issue.php - * - * @param CloseIssueRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function closeIssue(CloseIssueRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CloseIssue', $request, $callOptions)->wait(); - } - - /** - * Closes a pull request without merging. - * - * The async variant is {@see SecureSourceManagerClient::closePullRequestAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/close_pull_request.php - * - * @param ClosePullRequestRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function closePullRequest(ClosePullRequestRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ClosePullRequest', $request, $callOptions)->wait(); - } - - /** - * CreateBranchRule creates a branch rule in a given repository. - * - * The async variant is {@see SecureSourceManagerClient::createBranchRuleAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/create_branch_rule.php - * - * @param CreateBranchRuleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createBranchRule(CreateBranchRuleRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateBranchRule', $request, $callOptions)->wait(); - } - - /** - * Creates a new hook in a given repository. - * - * The async variant is {@see SecureSourceManagerClient::createHookAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/create_hook.php - * - * @param CreateHookRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createHook(CreateHookRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateHook', $request, $callOptions)->wait(); - } - - /** - * Creates a new instance in a given project and location. - * - * The async variant is {@see SecureSourceManagerClient::createInstanceAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/create_instance.php - * - * @param CreateInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createInstance(CreateInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateInstance', $request, $callOptions)->wait(); - } - - /** - * Creates an issue. - * - * The async variant is {@see SecureSourceManagerClient::createIssueAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/create_issue.php - * - * @param CreateIssueRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createIssue(CreateIssueRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateIssue', $request, $callOptions)->wait(); - } - - /** - * Creates an issue comment. - * - * The async variant is {@see SecureSourceManagerClient::createIssueCommentAsync()} - * . - * - * @example samples/V1/SecureSourceManagerClient/create_issue_comment.php - * - * @param CreateIssueCommentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createIssueComment(CreateIssueCommentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateIssueComment', $request, $callOptions)->wait(); - } - - /** - * Creates a pull request. - * - * The async variant is {@see SecureSourceManagerClient::createPullRequestAsync()} - * . - * - * @example samples/V1/SecureSourceManagerClient/create_pull_request.php - * - * @param CreatePullRequestRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createPullRequest(CreatePullRequestRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreatePullRequest', $request, $callOptions)->wait(); - } - - /** - * Creates a pull request comment. This function is used to create a single - * PullRequestComment of type Comment, or a single PullRequestComment of type - * Code that's replying to another PullRequestComment of type Code. Use - * BatchCreatePullRequestComments to create multiple PullRequestComments for - * code reviews. - * - * The async variant is - * {@see SecureSourceManagerClient::createPullRequestCommentAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/create_pull_request_comment.php - * - * @param CreatePullRequestCommentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createPullRequestComment(CreatePullRequestCommentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreatePullRequestComment', $request, $callOptions)->wait(); - } - - /** - * 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. - * - * The async variant is {@see SecureSourceManagerClient::createRepositoryAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/create_repository.php - * - * @param CreateRepositoryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createRepository(CreateRepositoryRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateRepository', $request, $callOptions)->wait(); - } - - /** - * DeleteBranchRule deletes a branch rule. - * - * The async variant is {@see SecureSourceManagerClient::deleteBranchRuleAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/delete_branch_rule.php - * - * @param DeleteBranchRuleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteBranchRule(DeleteBranchRuleRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteBranchRule', $request, $callOptions)->wait(); - } - - /** - * Deletes a Hook. - * - * The async variant is {@see SecureSourceManagerClient::deleteHookAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/delete_hook.php - * - * @param DeleteHookRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteHook(DeleteHookRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteHook', $request, $callOptions)->wait(); - } - - /** - * Deletes a single instance. - * - * The async variant is {@see SecureSourceManagerClient::deleteInstanceAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/delete_instance.php - * - * @param DeleteInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteInstance(DeleteInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteInstance', $request, $callOptions)->wait(); - } - - /** - * Deletes an issue. - * - * The async variant is {@see SecureSourceManagerClient::deleteIssueAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/delete_issue.php - * - * @param DeleteIssueRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteIssue(DeleteIssueRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteIssue', $request, $callOptions)->wait(); - } - - /** - * Deletes an issue comment. - * - * The async variant is {@see SecureSourceManagerClient::deleteIssueCommentAsync()} - * . - * - * @example samples/V1/SecureSourceManagerClient/delete_issue_comment.php - * - * @param DeleteIssueCommentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteIssueComment(DeleteIssueCommentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteIssueComment', $request, $callOptions)->wait(); - } - - /** - * Deletes a pull request comment. - * - * The async variant is - * {@see SecureSourceManagerClient::deletePullRequestCommentAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/delete_pull_request_comment.php - * - * @param DeletePullRequestCommentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deletePullRequestComment(DeletePullRequestCommentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeletePullRequestComment', $request, $callOptions)->wait(); - } - - /** - * Deletes a Repository. - * - * The async variant is {@see SecureSourceManagerClient::deleteRepositoryAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/delete_repository.php - * - * @param DeleteRepositoryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteRepository(DeleteRepositoryRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteRepository', $request, $callOptions)->wait(); - } - - /** - * Fetches a blob from a repository. - * - * The async variant is {@see SecureSourceManagerClient::fetchBlobAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/fetch_blob.php - * - * @param FetchBlobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return FetchBlobResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function fetchBlob(FetchBlobRequest $request, array $callOptions = []): FetchBlobResponse - { - return $this->startApiCall('FetchBlob', $request, $callOptions)->wait(); - } - - /** - * Fetches a tree from a repository. - * - * The async variant is {@see SecureSourceManagerClient::fetchTreeAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/fetch_tree.php - * - * @param FetchTreeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function fetchTree(FetchTreeRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('FetchTree', $request, $callOptions); - } - - /** - * GetBranchRule gets a branch rule. - * - * The async variant is {@see SecureSourceManagerClient::getBranchRuleAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/get_branch_rule.php - * - * @param GetBranchRuleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return BranchRule - * - * @throws ApiException Thrown if the API call fails. - */ - public function getBranchRule(GetBranchRuleRequest $request, array $callOptions = []): BranchRule - { - return $this->startApiCall('GetBranchRule', $request, $callOptions)->wait(); - } - - /** - * Gets metadata of a hook. - * - * The async variant is {@see SecureSourceManagerClient::getHookAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/get_hook.php - * - * @param GetHookRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Hook - * - * @throws ApiException Thrown if the API call fails. - */ - public function getHook(GetHookRequest $request, array $callOptions = []): Hook - { - return $this->startApiCall('GetHook', $request, $callOptions)->wait(); - } - - /** - * Get IAM policy for a repository. - * - * The async variant is {@see SecureSourceManagerClient::getIamPolicyRepoAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/get_iam_policy_repo.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicyRepo(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicyRepo', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single instance. - * - * The async variant is {@see SecureSourceManagerClient::getInstanceAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/get_instance.php - * - * @param GetInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Instance - * - * @throws ApiException Thrown if the API call fails. - */ - public function getInstance(GetInstanceRequest $request, array $callOptions = []): Instance - { - return $this->startApiCall('GetInstance', $request, $callOptions)->wait(); - } - - /** - * Gets an issue. - * - * The async variant is {@see SecureSourceManagerClient::getIssueAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/get_issue.php - * - * @param GetIssueRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Issue - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIssue(GetIssueRequest $request, array $callOptions = []): Issue - { - return $this->startApiCall('GetIssue', $request, $callOptions)->wait(); - } - - /** - * Gets an issue comment. - * - * The async variant is {@see SecureSourceManagerClient::getIssueCommentAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/get_issue_comment.php - * - * @param GetIssueCommentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return IssueComment - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIssueComment(GetIssueCommentRequest $request, array $callOptions = []): IssueComment - { - return $this->startApiCall('GetIssueComment', $request, $callOptions)->wait(); - } - - /** - * Gets a pull request. - * - * The async variant is {@see SecureSourceManagerClient::getPullRequestAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/get_pull_request.php - * - * @param GetPullRequestRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PullRequest - * - * @throws ApiException Thrown if the API call fails. - */ - public function getPullRequest(GetPullRequestRequest $request, array $callOptions = []): PullRequest - { - return $this->startApiCall('GetPullRequest', $request, $callOptions)->wait(); - } - - /** - * Gets a pull request comment. - * - * The async variant is - * {@see SecureSourceManagerClient::getPullRequestCommentAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/get_pull_request_comment.php - * - * @param GetPullRequestCommentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PullRequestComment - * - * @throws ApiException Thrown if the API call fails. - */ - public function getPullRequestComment(GetPullRequestCommentRequest $request, array $callOptions = []): PullRequestComment - { - return $this->startApiCall('GetPullRequestComment', $request, $callOptions)->wait(); - } - - /** - * Gets metadata of a repository. - * - * The async variant is {@see SecureSourceManagerClient::getRepositoryAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/get_repository.php - * - * @param GetRepositoryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Repository - * - * @throws ApiException Thrown if the API call fails. - */ - public function getRepository(GetRepositoryRequest $request, array $callOptions = []): Repository - { - return $this->startApiCall('GetRepository', $request, $callOptions)->wait(); - } - - /** - * ListBranchRules lists branch rules in a given repository. - * - * The async variant is {@see SecureSourceManagerClient::listBranchRulesAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/list_branch_rules.php - * - * @param ListBranchRulesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listBranchRules(ListBranchRulesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListBranchRules', $request, $callOptions); - } - - /** - * Lists hooks in a given repository. - * - * The async variant is {@see SecureSourceManagerClient::listHooksAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/list_hooks.php - * - * @param ListHooksRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listHooks(ListHooksRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListHooks', $request, $callOptions); - } - - /** - * Lists Instances in a given project and location. - * - * The async variant is {@see SecureSourceManagerClient::listInstancesAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/list_instances.php - * - * @param ListInstancesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listInstances(ListInstancesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListInstances', $request, $callOptions); - } - - /** - * Lists comments in an issue. - * - * The async variant is {@see SecureSourceManagerClient::listIssueCommentsAsync()} - * . - * - * @example samples/V1/SecureSourceManagerClient/list_issue_comments.php - * - * @param ListIssueCommentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listIssueComments(ListIssueCommentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListIssueComments', $request, $callOptions); - } - - /** - * Lists issues in a repository. - * - * The async variant is {@see SecureSourceManagerClient::listIssuesAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/list_issues.php - * - * @param ListIssuesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listIssues(ListIssuesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListIssues', $request, $callOptions); - } - - /** - * Lists pull request comments. - * - * The async variant is - * {@see SecureSourceManagerClient::listPullRequestCommentsAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/list_pull_request_comments.php - * - * @param ListPullRequestCommentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listPullRequestComments(ListPullRequestCommentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListPullRequestComments', $request, $callOptions); - } - - /** - * Lists a pull request's file diffs. - * - * The async variant is - * {@see SecureSourceManagerClient::listPullRequestFileDiffsAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/list_pull_request_file_diffs.php - * - * @param ListPullRequestFileDiffsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listPullRequestFileDiffs(ListPullRequestFileDiffsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListPullRequestFileDiffs', $request, $callOptions); - } - - /** - * Lists pull requests in a repository. - * - * The async variant is {@see SecureSourceManagerClient::listPullRequestsAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/list_pull_requests.php - * - * @param ListPullRequestsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listPullRequests(ListPullRequestsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListPullRequests', $request, $callOptions); - } - - /** - * 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. - * - * The async variant is {@see SecureSourceManagerClient::listRepositoriesAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/list_repositories.php - * - * @param ListRepositoriesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listRepositories(ListRepositoriesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListRepositories', $request, $callOptions); - } - - /** - * Merges a pull request. - * - * The async variant is {@see SecureSourceManagerClient::mergePullRequestAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/merge_pull_request.php - * - * @param MergePullRequestRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function mergePullRequest(MergePullRequestRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('MergePullRequest', $request, $callOptions)->wait(); - } - - /** - * Opens an issue. - * - * The async variant is {@see SecureSourceManagerClient::openIssueAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/open_issue.php - * - * @param OpenIssueRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function openIssue(OpenIssueRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('OpenIssue', $request, $callOptions)->wait(); - } - - /** - * Opens a pull request. - * - * The async variant is {@see SecureSourceManagerClient::openPullRequestAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/open_pull_request.php - * - * @param OpenPullRequestRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function openPullRequest(OpenPullRequestRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('OpenPullRequest', $request, $callOptions)->wait(); - } - - /** - * Resolves pull request comments. A list of PullRequestComment names must be - * provided. The PullRequestComment names must be in the same conversation - * thread. If auto_fill is set, all comments in the conversation thread will - * be resolved. - * - * The async variant is - * {@see SecureSourceManagerClient::resolvePullRequestCommentsAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/resolve_pull_request_comments.php - * - * @param ResolvePullRequestCommentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function resolvePullRequestComments(ResolvePullRequestCommentsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ResolvePullRequestComments', $request, $callOptions)->wait(); - } - - /** - * Set IAM policy on a repository. - * - * The async variant is {@see SecureSourceManagerClient::setIamPolicyRepoAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/set_iam_policy_repo.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicyRepo(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicyRepo', $request, $callOptions)->wait(); - } - - /** - * Test IAM permissions on a repository. - * IAM permission checks are not required on this method. - * - * The async variant is - * {@see SecureSourceManagerClient::testIamPermissionsRepoAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/test_iam_permissions_repo.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissionsRepo(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissionsRepo', $request, $callOptions)->wait(); - } - - /** - * Unresolves pull request comments. A list of PullRequestComment names must - * be provided. The PullRequestComment names must be in the same conversation - * thread. If auto_fill is set, all comments in the conversation thread will - * be unresolved. - * - * The async variant is - * {@see SecureSourceManagerClient::unresolvePullRequestCommentsAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/unresolve_pull_request_comments.php - * - * @param UnresolvePullRequestCommentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function unresolvePullRequestComments(UnresolvePullRequestCommentsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UnresolvePullRequestComments', $request, $callOptions)->wait(); - } - - /** - * UpdateBranchRule updates a branch rule. - * - * The async variant is {@see SecureSourceManagerClient::updateBranchRuleAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/update_branch_rule.php - * - * @param UpdateBranchRuleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateBranchRule(UpdateBranchRuleRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateBranchRule', $request, $callOptions)->wait(); - } - - /** - * Updates the metadata of a hook. - * - * The async variant is {@see SecureSourceManagerClient::updateHookAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/update_hook.php - * - * @param UpdateHookRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateHook(UpdateHookRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateHook', $request, $callOptions)->wait(); - } - - /** - * Updates a issue. - * - * The async variant is {@see SecureSourceManagerClient::updateIssueAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/update_issue.php - * - * @param UpdateIssueRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateIssue(UpdateIssueRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateIssue', $request, $callOptions)->wait(); - } - - /** - * Updates an issue comment. - * - * The async variant is {@see SecureSourceManagerClient::updateIssueCommentAsync()} - * . - * - * @example samples/V1/SecureSourceManagerClient/update_issue_comment.php - * - * @param UpdateIssueCommentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateIssueComment(UpdateIssueCommentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateIssueComment', $request, $callOptions)->wait(); - } - - /** - * Updates a pull request. - * - * The async variant is {@see SecureSourceManagerClient::updatePullRequestAsync()} - * . - * - * @example samples/V1/SecureSourceManagerClient/update_pull_request.php - * - * @param UpdatePullRequestRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updatePullRequest(UpdatePullRequestRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdatePullRequest', $request, $callOptions)->wait(); - } - - /** - * Updates a pull request comment. - * - * The async variant is - * {@see SecureSourceManagerClient::updatePullRequestCommentAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/update_pull_request_comment.php - * - * @param UpdatePullRequestCommentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updatePullRequestComment(UpdatePullRequestCommentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdatePullRequestComment', $request, $callOptions)->wait(); - } - - /** - * Updates the metadata of a repository. - * - * The async variant is {@see SecureSourceManagerClient::updateRepositoryAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/update_repository.php - * - * @param UpdateRepositoryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateRepository(UpdateRepositoryRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateRepository', $request, $callOptions)->wait(); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see SecureSourceManagerClient::getIamPolicyAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see SecureSourceManagerClient::setIamPolicyAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is {@see SecureSourceManagerClient::testIamPermissionsAsync()} - * . - * - * @example samples/V1/SecureSourceManagerClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see SecureSourceManagerClient::getLocationAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - - This method lists locations based on the resource scope provided in - the [ListLocationsRequest.name] field: - - * **Global locations**: If `name` is empty, the method lists the - public locations available to all projects. * **Project-specific - locations**: If `name` follows the format - `projects/{project}`, the method lists locations visible to that - specific project. This includes public, private, or other - project-specific locations enabled for the project. - - For gRPC and client library implementations, the resource name is - passed as the `name` field. For direct service calls, the resource - name is - incorporated into the request path based on the specific service - implementation and version. - * - * The async variant is {@see SecureSourceManagerClient::listLocationsAsync()} . - * - * @example samples/V1/SecureSourceManagerClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/SecureSourceManager/v1/src/V1/gapic_metadata.json b/owl-bot-staging/SecureSourceManager/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 194eafbf0a3e..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,303 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.securesourcemanager.v1", - "libraryPackage": "Google\\Cloud\\SecureSourceManager\\V1", - "services": { - "SecureSourceManager": { - "clients": { - "grpc": { - "libraryClient": "SecureSourceManagerGapicClient", - "rpcs": { - "BatchCreatePullRequestComments": { - "methods": [ - "batchCreatePullRequestComments" - ] - }, - "CloseIssue": { - "methods": [ - "closeIssue" - ] - }, - "ClosePullRequest": { - "methods": [ - "closePullRequest" - ] - }, - "CreateBranchRule": { - "methods": [ - "createBranchRule" - ] - }, - "CreateHook": { - "methods": [ - "createHook" - ] - }, - "CreateInstance": { - "methods": [ - "createInstance" - ] - }, - "CreateIssue": { - "methods": [ - "createIssue" - ] - }, - "CreateIssueComment": { - "methods": [ - "createIssueComment" - ] - }, - "CreatePullRequest": { - "methods": [ - "createPullRequest" - ] - }, - "CreatePullRequestComment": { - "methods": [ - "createPullRequestComment" - ] - }, - "CreateRepository": { - "methods": [ - "createRepository" - ] - }, - "DeleteBranchRule": { - "methods": [ - "deleteBranchRule" - ] - }, - "DeleteHook": { - "methods": [ - "deleteHook" - ] - }, - "DeleteInstance": { - "methods": [ - "deleteInstance" - ] - }, - "DeleteIssue": { - "methods": [ - "deleteIssue" - ] - }, - "DeleteIssueComment": { - "methods": [ - "deleteIssueComment" - ] - }, - "DeletePullRequestComment": { - "methods": [ - "deletePullRequestComment" - ] - }, - "DeleteRepository": { - "methods": [ - "deleteRepository" - ] - }, - "FetchBlob": { - "methods": [ - "fetchBlob" - ] - }, - "FetchTree": { - "methods": [ - "fetchTree" - ] - }, - "GetBranchRule": { - "methods": [ - "getBranchRule" - ] - }, - "GetHook": { - "methods": [ - "getHook" - ] - }, - "GetIamPolicyRepo": { - "methods": [ - "getIamPolicyRepo" - ] - }, - "GetInstance": { - "methods": [ - "getInstance" - ] - }, - "GetIssue": { - "methods": [ - "getIssue" - ] - }, - "GetIssueComment": { - "methods": [ - "getIssueComment" - ] - }, - "GetPullRequest": { - "methods": [ - "getPullRequest" - ] - }, - "GetPullRequestComment": { - "methods": [ - "getPullRequestComment" - ] - }, - "GetRepository": { - "methods": [ - "getRepository" - ] - }, - "ListBranchRules": { - "methods": [ - "listBranchRules" - ] - }, - "ListHooks": { - "methods": [ - "listHooks" - ] - }, - "ListInstances": { - "methods": [ - "listInstances" - ] - }, - "ListIssueComments": { - "methods": [ - "listIssueComments" - ] - }, - "ListIssues": { - "methods": [ - "listIssues" - ] - }, - "ListPullRequestComments": { - "methods": [ - "listPullRequestComments" - ] - }, - "ListPullRequestFileDiffs": { - "methods": [ - "listPullRequestFileDiffs" - ] - }, - "ListPullRequests": { - "methods": [ - "listPullRequests" - ] - }, - "ListRepositories": { - "methods": [ - "listRepositories" - ] - }, - "MergePullRequest": { - "methods": [ - "mergePullRequest" - ] - }, - "OpenIssue": { - "methods": [ - "openIssue" - ] - }, - "OpenPullRequest": { - "methods": [ - "openPullRequest" - ] - }, - "ResolvePullRequestComments": { - "methods": [ - "resolvePullRequestComments" - ] - }, - "SetIamPolicyRepo": { - "methods": [ - "setIamPolicyRepo" - ] - }, - "TestIamPermissionsRepo": { - "methods": [ - "testIamPermissionsRepo" - ] - }, - "UnresolvePullRequestComments": { - "methods": [ - "unresolvePullRequestComments" - ] - }, - "UpdateBranchRule": { - "methods": [ - "updateBranchRule" - ] - }, - "UpdateHook": { - "methods": [ - "updateHook" - ] - }, - "UpdateIssue": { - "methods": [ - "updateIssue" - ] - }, - "UpdateIssueComment": { - "methods": [ - "updateIssueComment" - ] - }, - "UpdatePullRequest": { - "methods": [ - "updatePullRequest" - ] - }, - "UpdatePullRequestComment": { - "methods": [ - "updatePullRequestComment" - ] - }, - "UpdateRepository": { - "methods": [ - "updateRepository" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/SecureSourceManager/v1/src/V1/resources/secure_source_manager_client_config.json b/owl-bot-staging/SecureSourceManager/v1/src/V1/resources/secure_source_manager_client_config.json deleted file mode 100644 index 0e997e350827..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/src/V1/resources/secure_source_manager_client_config.json +++ /dev/null @@ -1,319 +0,0 @@ -{ - "interfaces": { - "google.cloud.securesourcemanager.v1.SecureSourceManager": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "BatchCreatePullRequestComments": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CloseIssue": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ClosePullRequest": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateBranchRule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateHook": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateIssue": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateIssueComment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreatePullRequest": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreatePullRequestComment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateRepository": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteBranchRule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteHook": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteIssue": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteIssueComment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeletePullRequestComment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteRepository": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "FetchBlob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "FetchTree": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetBranchRule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetHook": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetIamPolicyRepo": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetInstance": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetIssue": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetIssueComment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetPullRequest": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetPullRequestComment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetRepository": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListBranchRules": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListHooks": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListInstances": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListIssueComments": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListIssues": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListPullRequestComments": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListPullRequestFileDiffs": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListPullRequests": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListRepositories": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "MergePullRequest": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "OpenIssue": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "OpenPullRequest": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ResolvePullRequestComments": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SetIamPolicyRepo": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TestIamPermissionsRepo": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UnresolvePullRequestComments": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateBranchRule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateHook": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateIssue": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateIssueComment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdatePullRequest": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdatePullRequestComment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateRepository": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/SecureSourceManager/v1/src/V1/resources/secure_source_manager_descriptor_config.php b/owl-bot-staging/SecureSourceManager/v1/src/V1/resources/secure_source_manager_descriptor_config.php deleted file mode 100644 index 94e2e5f04bbd..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/src/V1/resources/secure_source_manager_descriptor_config.php +++ /dev/null @@ -1,1036 +0,0 @@ - [ - 'google.cloud.securesourcemanager.v1.SecureSourceManager' => [ - 'BatchCreatePullRequestComments' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\BatchCreatePullRequestCommentsResponse', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CloseIssue' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\Issue', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ClosePullRequest' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\PullRequest', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateBranchRule' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\BranchRule', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateHook' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\Hook', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateIssue' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\Issue', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateIssueComment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\IssueComment', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreatePullRequest' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\PullRequest', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreatePullRequestComment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\PullRequestComment', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateRepository' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\Repository', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteBranchRule' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteHook' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteIssue' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteIssueComment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeletePullRequestComment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteRepository' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'MergePullRequest' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\PullRequest', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'OpenIssue' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\Issue', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'OpenPullRequest' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\PullRequest', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ResolvePullRequestComments' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\ResolvePullRequestCommentsResponse', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UnresolvePullRequestComments' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\UnresolvePullRequestCommentsResponse', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateBranchRule' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\BranchRule', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'branch_rule.name', - 'fieldAccessors' => [ - 'getBranchRule', - 'getName', - ], - ], - ], - ], - 'UpdateHook' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\Hook', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'hook.name', - 'fieldAccessors' => [ - 'getHook', - 'getName', - ], - ], - ], - ], - 'UpdateIssue' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\Issue', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'issue.name', - 'fieldAccessors' => [ - 'getIssue', - 'getName', - ], - ], - ], - ], - 'UpdateIssueComment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\IssueComment', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'issue_comment.name', - 'fieldAccessors' => [ - 'getIssueComment', - 'getName', - ], - ], - ], - ], - 'UpdatePullRequest' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\PullRequest', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'pull_request.name', - 'fieldAccessors' => [ - 'getPullRequest', - 'getName', - ], - ], - ], - ], - 'UpdatePullRequestComment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\PullRequestComment', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'pull_request_comment.name', - 'fieldAccessors' => [ - 'getPullRequestComment', - 'getName', - ], - ], - ], - ], - 'UpdateRepository' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\SecureSourceManager\V1\Repository', - 'metadataReturnType' => '\Google\Cloud\SecureSourceManager\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'repository.name', - 'fieldAccessors' => [ - 'getRepository', - 'getName', - ], - ], - ], - ], - 'FetchBlob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\SecureSourceManager\V1\FetchBlobResponse', - 'headerParams' => [ - [ - 'keyName' => 'repository', - 'fieldAccessors' => [ - 'getRepository', - ], - ], - ], - ], - 'FetchTree' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTreeEntries', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\SecureSourceManager\V1\FetchTreeResponse', - 'headerParams' => [ - [ - 'keyName' => 'repository', - 'fieldAccessors' => [ - 'getRepository', - ], - ], - ], - ], - 'GetBranchRule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\SecureSourceManager\V1\BranchRule', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetHook' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\SecureSourceManager\V1\Hook', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicyRepo' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'GetInstance' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\SecureSourceManager\V1\Instance', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIssue' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\SecureSourceManager\V1\Issue', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIssueComment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\SecureSourceManager\V1\IssueComment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetPullRequest' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\SecureSourceManager\V1\PullRequest', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetPullRequestComment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\SecureSourceManager\V1\PullRequestComment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetRepository' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\SecureSourceManager\V1\Repository', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListBranchRules' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getBranchRules', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\SecureSourceManager\V1\ListBranchRulesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListHooks' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getHooks', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\SecureSourceManager\V1\ListHooksResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListInstances' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getInstances', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\SecureSourceManager\V1\ListInstancesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListIssueComments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getIssueComments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\SecureSourceManager\V1\ListIssueCommentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListIssues' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getIssues', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\SecureSourceManager\V1\ListIssuesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListPullRequestComments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getPullRequestComments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\SecureSourceManager\V1\ListPullRequestCommentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListPullRequestFileDiffs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getFileDiffs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\SecureSourceManager\V1\ListPullRequestFileDiffsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListPullRequests' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getPullRequests', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\SecureSourceManager\V1\ListPullRequestsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListRepositories' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getRepositories', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\SecureSourceManager\V1\ListRepositoriesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'SetIamPolicyRepo' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissionsRepo' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'branchRule' => 'projects/{project}/locations/{location}/repositories/{repository}/branchRules/{branch_rule}', - 'caPool' => 'projects/{project}/locations/{location}/caPools/{ca_pool}', - 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', - 'hook' => 'projects/{project}/locations/{location}/repositories/{repository}/hooks/{hook}', - 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', - 'issue' => 'projects/{project}/locations/{location}/repositories/{repository}/issues/{issue}', - 'issueComment' => 'projects/{project}/locations/{location}/repositories/{repository}/issues/{issue}/issueComments/{comment}', - 'location' => 'projects/{project}/locations/{location}', - 'pullRequest' => 'projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}', - 'pullRequestComment' => 'projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}/pullRequestComments/{comment}', - 'repository' => 'projects/{project}/locations/{location}/repositories/{repository}', - 'serviceAttachment' => 'projects/{project}/regions/{region}/serviceAttachments/{service_attachment}', - ], - ], - ], -]; diff --git a/owl-bot-staging/SecureSourceManager/v1/src/V1/resources/secure_source_manager_rest_client_config.php b/owl-bot-staging/SecureSourceManager/v1/src/V1/resources/secure_source_manager_rest_client_config.php deleted file mode 100644 index a86b61e2541e..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/src/V1/resources/secure_source_manager_rest_client_config.php +++ /dev/null @@ -1,753 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.securesourcemanager.v1.SecureSourceManager' => [ - 'BatchCreatePullRequestComments' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:batchCreate', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CloseIssue' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/issues/*}:close', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ClosePullRequest' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:close', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateBranchRule' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*}/branchRules', - 'body' => 'branch_rule', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'branch_rule_id', - ], - ], - 'CreateHook' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*}/hooks', - 'body' => 'hook', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'hook_id', - ], - ], - 'CreateInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/instances', - 'body' => 'instance', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'instance_id', - ], - ], - 'CreateIssue' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*}/issues', - 'body' => 'issue', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateIssueComment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*/issues/*}/issueComments', - 'body' => 'issue_comment', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreatePullRequest' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*}/pullRequests', - 'body' => 'pull_request', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreatePullRequestComment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments', - 'body' => 'pull_request_comment', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateRepository' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/repositories', - 'body' => 'repository', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'repository_id', - ], - ], - 'DeleteBranchRule' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/branchRules/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteHook' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/hooks/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteInstance' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteIssue' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/issues/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteIssueComment' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/issues/*/issueComments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeletePullRequestComment' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*/pullRequestComments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteRepository' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'FetchBlob' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{repository=projects/*/locations/*/repositories/*}:fetchBlob', - 'placeholders' => [ - 'repository' => [ - 'getters' => [ - 'getRepository', - ], - ], - ], - ], - 'FetchTree' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{repository=projects/*/locations/*/repositories/*}:fetchTree', - 'placeholders' => [ - 'repository' => [ - 'getters' => [ - 'getRepository', - ], - ], - ], - ], - 'GetBranchRule' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/branchRules/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetHook' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/hooks/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicyRepo' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/repositories/*}:getIamPolicy', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'GetInstance' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIssue' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/issues/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIssueComment' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/issues/*/issueComments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetPullRequest' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetPullRequestComment' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*/pullRequestComments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetRepository' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListBranchRules' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*}/branchRules', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListHooks' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*}/hooks', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListInstances' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/instances', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListIssueComments' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*/issues/*}/issueComments', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListIssues' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*}/issues', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListPullRequestComments' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListPullRequestFileDiffs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:listFileDiffs', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListPullRequests' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*}/pullRequests', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListRepositories' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/repositories', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'MergePullRequest' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:merge', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'OpenIssue' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/issues/*}:open', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'OpenPullRequest' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/repositories/*/pullRequests/*}:open', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ResolvePullRequestComments' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:resolve', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SetIamPolicyRepo' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/repositories/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissionsRepo' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/repositories/*}:testIamPermissions', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'UnresolvePullRequestComments' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/repositories/*/pullRequests/*}/pullRequestComments:unresolve', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateBranchRule' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{branch_rule.name=projects/*/locations/*/repositories/*/branchRules/*}', - 'body' => 'branch_rule', - 'placeholders' => [ - 'branch_rule.name' => [ - 'getters' => [ - 'getBranchRule', - 'getName', - ], - ], - ], - ], - 'UpdateHook' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{hook.name=projects/*/locations/*/repositories/*/hooks/*}', - 'body' => 'hook', - 'placeholders' => [ - 'hook.name' => [ - 'getters' => [ - 'getHook', - 'getName', - ], - ], - ], - ], - 'UpdateIssue' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{issue.name=projects/*/locations/*/repositories/*/issues/*}', - 'body' => 'issue', - 'placeholders' => [ - 'issue.name' => [ - 'getters' => [ - 'getIssue', - 'getName', - ], - ], - ], - ], - 'UpdateIssueComment' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{issue_comment.name=projects/*/locations/*/repositories/*/issues/*/issueComments/*}', - 'body' => 'issue_comment', - 'placeholders' => [ - 'issue_comment.name' => [ - 'getters' => [ - 'getIssueComment', - 'getName', - ], - ], - ], - ], - 'UpdatePullRequest' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{pull_request.name=projects/*/locations/*/repositories/*/pullRequests/*}', - 'body' => 'pull_request', - 'placeholders' => [ - 'pull_request.name' => [ - 'getters' => [ - 'getPullRequest', - 'getName', - ], - ], - ], - ], - 'UpdatePullRequestComment' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{pull_request_comment.name=projects/*/locations/*/repositories/*/pullRequests/*/pullRequestComments/*}', - 'body' => 'pull_request_comment', - 'placeholders' => [ - 'pull_request_comment.name' => [ - 'getters' => [ - 'getPullRequestComment', - 'getName', - ], - ], - ], - ], - 'UpdateRepository' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{repository.name=projects/*/locations/*/repositories/*}', - 'body' => 'repository', - 'placeholders' => [ - 'repository.name' => [ - 'getters' => [ - 'getRepository', - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/instances/*}:getIamPolicy', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/instances/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/instances/*}:testIamPermissions', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/SecureSourceManager/v1/tests/Unit/V1/Client/SecureSourceManagerClientTest.php b/owl-bot-staging/SecureSourceManager/v1/tests/Unit/V1/Client/SecureSourceManagerClientTest.php deleted file mode 100644 index 34a8e55b0034..000000000000 --- a/owl-bot-staging/SecureSourceManager/v1/tests/Unit/V1/Client/SecureSourceManagerClientTest.php +++ /dev/null @@ -1,6050 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SecureSourceManagerClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SecureSourceManagerClient($options); - } - - /** @test */ - public function batchCreatePullRequestCommentsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchCreatePullRequestCommentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new BatchCreatePullRequestCommentsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/batchCreatePullRequestCommentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); - $requests = []; - $request = (new BatchCreatePullRequestCommentsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); - $response = $gapicClient->batchCreatePullRequestComments($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/BatchCreatePullRequestComments', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getRequests(); - $this->assertProtobufEquals($requests, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchCreatePullRequestCommentsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function batchCreatePullRequestCommentsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchCreatePullRequestCommentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); - $requests = []; - $request = (new BatchCreatePullRequestCommentsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); - $response = $gapicClient->batchCreatePullRequestComments($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchCreatePullRequestCommentsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function closeIssueTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/closeIssueTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $title = 'title110371416'; - $body = 'body3029410'; - $etag2 = 'etag2-1293302904'; - $expectedResponse = new Issue(); - $expectedResponse->setName($name2); - $expectedResponse->setTitle($title); - $expectedResponse->setBody($body); - $expectedResponse->setEtag($etag2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/closeIssueTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]'); - $request = (new CloseIssueRequest()) - ->setName($formattedName); - $response = $gapicClient->closeIssue($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/CloseIssue', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/closeIssueTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function closeIssueExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/closeIssueTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]'); - $request = (new CloseIssueRequest()) - ->setName($formattedName); - $response = $gapicClient->closeIssue($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/closeIssueTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function closePullRequestTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/closePullRequestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $title = 'title110371416'; - $body = 'body3029410'; - $expectedResponse = new PullRequest(); - $expectedResponse->setName($name2); - $expectedResponse->setTitle($title); - $expectedResponse->setBody($body); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/closePullRequestTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); - $request = (new ClosePullRequestRequest()) - ->setName($formattedName); - $response = $gapicClient->closePullRequest($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/ClosePullRequest', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/closePullRequestTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function closePullRequestExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/closePullRequestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); - $request = (new ClosePullRequestRequest()) - ->setName($formattedName); - $response = $gapicClient->closePullRequest($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/closePullRequestTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createBranchRuleTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createBranchRuleTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $etag = 'etag3123477'; - $includePattern = 'includePattern-1182351623'; - $disabled = true; - $requirePullRequest = false; - $minimumReviewsCount = 672799098; - $minimumApprovalsCount = 579210129; - $requireCodeOwnerApproval = false; - $requireCommentsResolved = false; - $allowStaleReviews = false; - $requireLinearHistory = true; - $expectedResponse = new BranchRule(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setEtag($etag); - $expectedResponse->setIncludePattern($includePattern); - $expectedResponse->setDisabled($disabled); - $expectedResponse->setRequirePullRequest($requirePullRequest); - $expectedResponse->setMinimumReviewsCount($minimumReviewsCount); - $expectedResponse->setMinimumApprovalsCount($minimumApprovalsCount); - $expectedResponse->setRequireCodeOwnerApproval($requireCodeOwnerApproval); - $expectedResponse->setRequireCommentsResolved($requireCommentsResolved); - $expectedResponse->setAllowStaleReviews($allowStaleReviews); - $expectedResponse->setRequireLinearHistory($requireLinearHistory); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createBranchRuleTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); - $branchRule = new BranchRule(); - $branchRuleId = 'branchRuleId786871201'; - $request = (new CreateBranchRuleRequest()) - ->setParent($formattedParent) - ->setBranchRule($branchRule) - ->setBranchRuleId($branchRuleId); - $response = $gapicClient->createBranchRule($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/CreateBranchRule', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getBranchRule(); - $this->assertProtobufEquals($branchRule, $actualValue); - $actualValue = $actualApiRequestObject->getBranchRuleId(); - $this->assertProtobufEquals($branchRuleId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBranchRuleTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createBranchRuleExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createBranchRuleTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); - $branchRule = new BranchRule(); - $branchRuleId = 'branchRuleId786871201'; - $request = (new CreateBranchRuleRequest()) - ->setParent($formattedParent) - ->setBranchRule($branchRule) - ->setBranchRuleId($branchRuleId); - $response = $gapicClient->createBranchRule($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBranchRuleTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createHookTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createHookTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $targetUri = 'targetUri486946238'; - $disabled = true; - $uid = 'uid115792'; - $sensitiveQueryString = 'sensitiveQueryString1820021361'; - $expectedResponse = new Hook(); - $expectedResponse->setName($name); - $expectedResponse->setTargetUri($targetUri); - $expectedResponse->setDisabled($disabled); - $expectedResponse->setUid($uid); - $expectedResponse->setSensitiveQueryString($sensitiveQueryString); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createHookTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); - $hook = new Hook(); - $hookTargetUri = 'hookTargetUri737306680'; - $hook->setTargetUri($hookTargetUri); - $hookId = 'hookId1094731191'; - $request = (new CreateHookRequest()) - ->setParent($formattedParent) - ->setHook($hook) - ->setHookId($hookId); - $response = $gapicClient->createHook($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/CreateHook', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getHook(); - $this->assertProtobufEquals($hook, $actualValue); - $actualValue = $actualApiRequestObject->getHookId(); - $this->assertProtobufEquals($hookId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createHookTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createHookExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createHookTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); - $hook = new Hook(); - $hookTargetUri = 'hookTargetUri737306680'; - $hook->setTargetUri($hookTargetUri); - $hookId = 'hookId1094731191'; - $request = (new CreateHookRequest()) - ->setParent($formattedParent) - ->setHook($hook) - ->setHookId($hookId); - $response = $gapicClient->createHook($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createHookTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createInstanceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $kmsKey = 'kmsKey-591635343'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setKmsKey($kmsKey); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $instanceId = 'instanceId-2101995259'; - $instance = new Instance(); - $request = (new CreateInstanceRequest()) - ->setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance); - $response = $gapicClient->createInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/CreateInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getInstanceId(); - $this->assertProtobufEquals($instanceId, $actualValue); - $actualValue = $actualApiRequestObject->getInstance(); - $this->assertProtobufEquals($instance, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInstanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createInstanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $instanceId = 'instanceId-2101995259'; - $instance = new Instance(); - $request = (new CreateInstanceRequest()) - ->setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance); - $response = $gapicClient->createInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createIssueTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createIssueTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $title = 'title110371416'; - $body = 'body3029410'; - $etag = 'etag3123477'; - $expectedResponse = new Issue(); - $expectedResponse->setName($name); - $expectedResponse->setTitle($title); - $expectedResponse->setBody($body); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createIssueTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); - $issue = new Issue(); - $issueTitle = 'issueTitle1432889599'; - $issue->setTitle($issueTitle); - $request = (new CreateIssueRequest()) - ->setParent($formattedParent) - ->setIssue($issue); - $response = $gapicClient->createIssue($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/CreateIssue', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getIssue(); - $this->assertProtobufEquals($issue, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createIssueTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createIssueExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createIssueTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); - $issue = new Issue(); - $issueTitle = 'issueTitle1432889599'; - $issue->setTitle($issueTitle); - $request = (new CreateIssueRequest()) - ->setParent($formattedParent) - ->setIssue($issue); - $response = $gapicClient->createIssue($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createIssueTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createIssueCommentTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createIssueCommentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $body = 'body3029410'; - $expectedResponse = new IssueComment(); - $expectedResponse->setName($name); - $expectedResponse->setBody($body); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createIssueCommentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]'); - $issueComment = new IssueComment(); - $issueCommentBody = 'issueCommentBody1153532424'; - $issueComment->setBody($issueCommentBody); - $request = (new CreateIssueCommentRequest()) - ->setParent($formattedParent) - ->setIssueComment($issueComment); - $response = $gapicClient->createIssueComment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/CreateIssueComment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getIssueComment(); - $this->assertProtobufEquals($issueComment, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createIssueCommentTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createIssueCommentExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createIssueCommentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]'); - $issueComment = new IssueComment(); - $issueCommentBody = 'issueCommentBody1153532424'; - $issueComment->setBody($issueCommentBody); - $request = (new CreateIssueCommentRequest()) - ->setParent($formattedParent) - ->setIssueComment($issueComment); - $response = $gapicClient->createIssueComment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createIssueCommentTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createPullRequestTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createPullRequestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $title = 'title110371416'; - $body = 'body3029410'; - $expectedResponse = new PullRequest(); - $expectedResponse->setName($name); - $expectedResponse->setTitle($title); - $expectedResponse->setBody($body); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createPullRequestTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); - $pullRequest = new PullRequest(); - $pullRequestTitle = 'pullRequestTitle13255662'; - $pullRequest->setTitle($pullRequestTitle); - $pullRequestBase = new Branch(); - $baseRef = 'baseRef-332628990'; - $pullRequestBase->setRef($baseRef); - $pullRequest->setBase($pullRequestBase); - $request = (new CreatePullRequestRequest()) - ->setParent($formattedParent) - ->setPullRequest($pullRequest); - $response = $gapicClient->createPullRequest($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/CreatePullRequest', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getPullRequest(); - $this->assertProtobufEquals($pullRequest, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createPullRequestTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createPullRequestExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createPullRequestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); - $pullRequest = new PullRequest(); - $pullRequestTitle = 'pullRequestTitle13255662'; - $pullRequest->setTitle($pullRequestTitle); - $pullRequestBase = new Branch(); - $baseRef = 'baseRef-332628990'; - $pullRequestBase->setRef($baseRef); - $pullRequest->setBase($pullRequestBase); - $request = (new CreatePullRequestRequest()) - ->setParent($formattedParent) - ->setPullRequest($pullRequest); - $response = $gapicClient->createPullRequest($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createPullRequestTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createPullRequestCommentTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createPullRequestCommentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new PullRequestComment(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createPullRequestCommentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); - $pullRequestComment = new PullRequestComment(); - $request = (new CreatePullRequestCommentRequest()) - ->setParent($formattedParent) - ->setPullRequestComment($pullRequestComment); - $response = $gapicClient->createPullRequestComment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/CreatePullRequestComment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getPullRequestComment(); - $this->assertProtobufEquals($pullRequestComment, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createPullRequestCommentTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createPullRequestCommentExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createPullRequestCommentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); - $pullRequestComment = new PullRequestComment(); - $request = (new CreatePullRequestCommentRequest()) - ->setParent($formattedParent) - ->setPullRequestComment($pullRequestComment); - $response = $gapicClient->createPullRequestComment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createPullRequestCommentTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createRepositoryTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createRepositoryTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $instance = 'instance555127957'; - $uid = 'uid115792'; - $etag = 'etag3123477'; - $expectedResponse = new Repository(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setInstance($instance); - $expectedResponse->setUid($uid); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createRepositoryTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $repository = new Repository(); - $repositoryId = 'repositoryId1101683248'; - $request = (new CreateRepositoryRequest()) - ->setParent($formattedParent) - ->setRepository($repository) - ->setRepositoryId($repositoryId); - $response = $gapicClient->createRepository($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/CreateRepository', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getRepository(); - $this->assertProtobufEquals($repository, $actualValue); - $actualValue = $actualApiRequestObject->getRepositoryId(); - $this->assertProtobufEquals($repositoryId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createRepositoryTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createRepositoryExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createRepositoryTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $repository = new Repository(); - $repositoryId = 'repositoryId1101683248'; - $request = (new CreateRepositoryRequest()) - ->setParent($formattedParent) - ->setRepository($repository) - ->setRepositoryId($repositoryId); - $response = $gapicClient->createRepository($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createRepositoryTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteBranchRuleTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteBranchRuleTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteBranchRuleTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->branchRuleName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[BRANCH_RULE]'); - $request = (new DeleteBranchRuleRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteBranchRule($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/DeleteBranchRule', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteBranchRuleTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteBranchRuleExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteBranchRuleTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->branchRuleName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[BRANCH_RULE]'); - $request = (new DeleteBranchRuleRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteBranchRule($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteBranchRuleTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteHookTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteHookTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteHookTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->hookName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[HOOK]'); - $request = (new DeleteHookRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteHook($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/DeleteHook', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteHookTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteHookExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteHookTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->hookName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[HOOK]'); - $request = (new DeleteHookRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteHook($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteHookTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteInstanceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new DeleteInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/DeleteInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteInstanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new DeleteInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteIssueTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteIssueTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteIssueTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]'); - $request = (new DeleteIssueRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteIssue($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/DeleteIssue', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteIssueTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteIssueExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteIssueTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]'); - $request = (new DeleteIssueRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteIssue($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteIssueTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteIssueCommentTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteIssueCommentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteIssueCommentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->issueCommentName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]', '[COMMENT]'); - $request = (new DeleteIssueCommentRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteIssueComment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/DeleteIssueComment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteIssueCommentTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteIssueCommentExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteIssueCommentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->issueCommentName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]', '[COMMENT]'); - $request = (new DeleteIssueCommentRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteIssueComment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteIssueCommentTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deletePullRequestCommentTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deletePullRequestCommentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deletePullRequestCommentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->pullRequestCommentName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]', '[COMMENT]'); - $request = (new DeletePullRequestCommentRequest()) - ->setName($formattedName); - $response = $gapicClient->deletePullRequestComment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/DeletePullRequestComment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deletePullRequestCommentTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deletePullRequestCommentExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deletePullRequestCommentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->pullRequestCommentName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]', '[COMMENT]'); - $request = (new DeletePullRequestCommentRequest()) - ->setName($formattedName); - $response = $gapicClient->deletePullRequestComment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deletePullRequestCommentTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteRepositoryTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteRepositoryTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteRepositoryTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); - $request = (new DeleteRepositoryRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteRepository($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/DeleteRepository', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteRepositoryTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteRepositoryExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteRepositoryTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); - $request = (new DeleteRepositoryRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteRepository($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteRepositoryTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function fetchBlobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $sha2 = 'sha2109399391'; - $content = 'content951530617'; - $expectedResponse = new FetchBlobResponse(); - $expectedResponse->setSha($sha2); - $expectedResponse->setContent($content); - $transport->addResponse($expectedResponse); - // Mock request - $formattedRepository = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); - $sha = 'sha113836'; - $request = (new FetchBlobRequest()) - ->setRepository($formattedRepository) - ->setSha($sha); - $response = $gapicClient->fetchBlob($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/FetchBlob', $actualFuncCall); - $actualValue = $actualRequestObject->getRepository(); - $this->assertProtobufEquals($formattedRepository, $actualValue); - $actualValue = $actualRequestObject->getSha(); - $this->assertProtobufEquals($sha, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function fetchBlobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedRepository = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); - $sha = 'sha113836'; - $request = (new FetchBlobRequest()) - ->setRepository($formattedRepository) - ->setSha($sha); - try { - $gapicClient->fetchBlob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function fetchTreeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $treeEntriesElement = new TreeEntry(); - $treeEntries = [ - $treeEntriesElement, - ]; - $expectedResponse = new FetchTreeResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTreeEntries($treeEntries); - $transport->addResponse($expectedResponse); - // Mock request - $formattedRepository = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); - $request = (new FetchTreeRequest()) - ->setRepository($formattedRepository); - $response = $gapicClient->fetchTree($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTreeEntries()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/FetchTree', $actualFuncCall); - $actualValue = $actualRequestObject->getRepository(); - $this->assertProtobufEquals($formattedRepository, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function fetchTreeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedRepository = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); - $request = (new FetchTreeRequest()) - ->setRepository($formattedRepository); - try { - $gapicClient->fetchTree($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBranchRuleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $etag = 'etag3123477'; - $includePattern = 'includePattern-1182351623'; - $disabled = true; - $requirePullRequest = false; - $minimumReviewsCount = 672799098; - $minimumApprovalsCount = 579210129; - $requireCodeOwnerApproval = false; - $requireCommentsResolved = false; - $allowStaleReviews = false; - $requireLinearHistory = true; - $expectedResponse = new BranchRule(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setEtag($etag); - $expectedResponse->setIncludePattern($includePattern); - $expectedResponse->setDisabled($disabled); - $expectedResponse->setRequirePullRequest($requirePullRequest); - $expectedResponse->setMinimumReviewsCount($minimumReviewsCount); - $expectedResponse->setMinimumApprovalsCount($minimumApprovalsCount); - $expectedResponse->setRequireCodeOwnerApproval($requireCodeOwnerApproval); - $expectedResponse->setRequireCommentsResolved($requireCommentsResolved); - $expectedResponse->setAllowStaleReviews($allowStaleReviews); - $expectedResponse->setRequireLinearHistory($requireLinearHistory); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->branchRuleName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[BRANCH_RULE]'); - $request = (new GetBranchRuleRequest()) - ->setName($formattedName); - $response = $gapicClient->getBranchRule($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/GetBranchRule', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBranchRuleExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->branchRuleName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[BRANCH_RULE]'); - $request = (new GetBranchRuleRequest()) - ->setName($formattedName); - try { - $gapicClient->getBranchRule($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getHookTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $targetUri = 'targetUri486946238'; - $disabled = true; - $uid = 'uid115792'; - $sensitiveQueryString = 'sensitiveQueryString1820021361'; - $expectedResponse = new Hook(); - $expectedResponse->setName($name2); - $expectedResponse->setTargetUri($targetUri); - $expectedResponse->setDisabled($disabled); - $expectedResponse->setUid($uid); - $expectedResponse->setSensitiveQueryString($sensitiveQueryString); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->hookName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[HOOK]'); - $request = (new GetHookRequest()) - ->setName($formattedName); - $response = $gapicClient->getHook($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/GetHook', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getHookExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->hookName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[HOOK]'); - $request = (new GetHookRequest()) - ->setName($formattedName); - try { - $gapicClient->getHook($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyRepoTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicyRepo($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/GetIamPolicyRepo', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyRepoExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicyRepo($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInstanceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $kmsKey = 'kmsKey-591635343'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setKmsKey($kmsKey); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->getInstance($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/GetInstance', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInstanceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetInstanceRequest()) - ->setName($formattedName); - try { - $gapicClient->getInstance($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIssueTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $title = 'title110371416'; - $body = 'body3029410'; - $etag = 'etag3123477'; - $expectedResponse = new Issue(); - $expectedResponse->setName($name2); - $expectedResponse->setTitle($title); - $expectedResponse->setBody($body); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]'); - $request = (new GetIssueRequest()) - ->setName($formattedName); - $response = $gapicClient->getIssue($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/GetIssue', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIssueExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]'); - $request = (new GetIssueRequest()) - ->setName($formattedName); - try { - $gapicClient->getIssue($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIssueCommentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $body = 'body3029410'; - $expectedResponse = new IssueComment(); - $expectedResponse->setName($name2); - $expectedResponse->setBody($body); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->issueCommentName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]', '[COMMENT]'); - $request = (new GetIssueCommentRequest()) - ->setName($formattedName); - $response = $gapicClient->getIssueComment($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/GetIssueComment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIssueCommentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->issueCommentName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]', '[COMMENT]'); - $request = (new GetIssueCommentRequest()) - ->setName($formattedName); - try { - $gapicClient->getIssueComment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPullRequestTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $title = 'title110371416'; - $body = 'body3029410'; - $expectedResponse = new PullRequest(); - $expectedResponse->setName($name2); - $expectedResponse->setTitle($title); - $expectedResponse->setBody($body); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); - $request = (new GetPullRequestRequest()) - ->setName($formattedName); - $response = $gapicClient->getPullRequest($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/GetPullRequest', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPullRequestExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); - $request = (new GetPullRequestRequest()) - ->setName($formattedName); - try { - $gapicClient->getPullRequest($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPullRequestCommentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new PullRequestComment(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->pullRequestCommentName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]', '[COMMENT]'); - $request = (new GetPullRequestCommentRequest()) - ->setName($formattedName); - $response = $gapicClient->getPullRequestComment($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/GetPullRequestComment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPullRequestCommentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->pullRequestCommentName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]', '[COMMENT]'); - $request = (new GetPullRequestCommentRequest()) - ->setName($formattedName); - try { - $gapicClient->getPullRequestComment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRepositoryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $instance = 'instance555127957'; - $uid = 'uid115792'; - $etag = 'etag3123477'; - $expectedResponse = new Repository(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setInstance($instance); - $expectedResponse->setUid($uid); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); - $request = (new GetRepositoryRequest()) - ->setName($formattedName); - $response = $gapicClient->getRepository($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/GetRepository', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRepositoryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); - $request = (new GetRepositoryRequest()) - ->setName($formattedName); - try { - $gapicClient->getRepository($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBranchRulesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $branchRulesElement = new BranchRule(); - $branchRules = [ - $branchRulesElement, - ]; - $expectedResponse = new ListBranchRulesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setBranchRules($branchRules); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); - $request = (new ListBranchRulesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listBranchRules($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getBranchRules()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/ListBranchRules', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBranchRulesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); - $request = (new ListBranchRulesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listBranchRules($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listHooksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $hooksElement = new Hook(); - $hooks = [ - $hooksElement, - ]; - $expectedResponse = new ListHooksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setHooks($hooks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); - $request = (new ListHooksRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listHooks($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getHooks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/ListHooks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listHooksExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); - $request = (new ListHooksRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listHooks($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listInstancesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $instancesElement = new Instance(); - $instances = [ - $instancesElement, - ]; - $expectedResponse = new ListInstancesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setInstances($instances); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListInstancesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listInstances($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getInstances()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/ListInstances', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listInstancesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListInstancesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listInstances($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listIssueCommentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $issueCommentsElement = new IssueComment(); - $issueComments = [ - $issueCommentsElement, - ]; - $expectedResponse = new ListIssueCommentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setIssueComments($issueComments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]'); - $request = (new ListIssueCommentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listIssueComments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getIssueComments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/ListIssueComments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listIssueCommentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]'); - $request = (new ListIssueCommentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listIssueComments($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listIssuesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $issuesElement = new Issue(); - $issues = [ - $issuesElement, - ]; - $expectedResponse = new ListIssuesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setIssues($issues); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); - $request = (new ListIssuesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listIssues($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getIssues()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/ListIssues', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listIssuesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); - $request = (new ListIssuesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listIssues($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPullRequestCommentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $pullRequestCommentsElement = new PullRequestComment(); - $pullRequestComments = [ - $pullRequestCommentsElement, - ]; - $expectedResponse = new ListPullRequestCommentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPullRequestComments($pullRequestComments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); - $request = (new ListPullRequestCommentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listPullRequestComments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPullRequestComments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/ListPullRequestComments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPullRequestCommentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); - $request = (new ListPullRequestCommentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listPullRequestComments($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPullRequestFileDiffsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $fileDiffsElement = new FileDiff(); - $fileDiffs = [ - $fileDiffsElement, - ]; - $expectedResponse = new ListPullRequestFileDiffsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setFileDiffs($fileDiffs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); - $request = (new ListPullRequestFileDiffsRequest()) - ->setName($formattedName); - $response = $gapicClient->listPullRequestFileDiffs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getFileDiffs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/ListPullRequestFileDiffs', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPullRequestFileDiffsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); - $request = (new ListPullRequestFileDiffsRequest()) - ->setName($formattedName); - try { - $gapicClient->listPullRequestFileDiffs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPullRequestsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $pullRequestsElement = new PullRequest(); - $pullRequests = [ - $pullRequestsElement, - ]; - $expectedResponse = new ListPullRequestsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPullRequests($pullRequests); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); - $request = (new ListPullRequestsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listPullRequests($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPullRequests()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/ListPullRequests', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPullRequestsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->repositoryName('[PROJECT]', '[LOCATION]', '[REPOSITORY]'); - $request = (new ListPullRequestsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listPullRequests($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRepositoriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $repositoriesElement = new Repository(); - $repositories = [ - $repositoriesElement, - ]; - $expectedResponse = new ListRepositoriesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setRepositories($repositories); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListRepositoriesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listRepositories($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRepositories()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/ListRepositories', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRepositoriesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListRepositoriesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listRepositories($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function mergePullRequestTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/mergePullRequestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $title = 'title110371416'; - $body = 'body3029410'; - $expectedResponse = new PullRequest(); - $expectedResponse->setName($name2); - $expectedResponse->setTitle($title); - $expectedResponse->setBody($body); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/mergePullRequestTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); - $request = (new MergePullRequestRequest()) - ->setName($formattedName); - $response = $gapicClient->mergePullRequest($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/MergePullRequest', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/mergePullRequestTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function mergePullRequestExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/mergePullRequestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); - $request = (new MergePullRequestRequest()) - ->setName($formattedName); - $response = $gapicClient->mergePullRequest($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/mergePullRequestTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function openIssueTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/openIssueTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $title = 'title110371416'; - $body = 'body3029410'; - $etag2 = 'etag2-1293302904'; - $expectedResponse = new Issue(); - $expectedResponse->setName($name2); - $expectedResponse->setTitle($title); - $expectedResponse->setBody($body); - $expectedResponse->setEtag($etag2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/openIssueTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]'); - $request = (new OpenIssueRequest()) - ->setName($formattedName); - $response = $gapicClient->openIssue($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/OpenIssue', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/openIssueTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function openIssueExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/openIssueTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->issueName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[ISSUE]'); - $request = (new OpenIssueRequest()) - ->setName($formattedName); - $response = $gapicClient->openIssue($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/openIssueTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function openPullRequestTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/openPullRequestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $title = 'title110371416'; - $body = 'body3029410'; - $expectedResponse = new PullRequest(); - $expectedResponse->setName($name2); - $expectedResponse->setTitle($title); - $expectedResponse->setBody($body); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/openPullRequestTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); - $request = (new OpenPullRequestRequest()) - ->setName($formattedName); - $response = $gapicClient->openPullRequest($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/OpenPullRequest', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/openPullRequestTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function openPullRequestExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/openPullRequestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); - $request = (new OpenPullRequestRequest()) - ->setName($formattedName); - $response = $gapicClient->openPullRequest($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/openPullRequestTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function resolvePullRequestCommentsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resolvePullRequestCommentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ResolvePullRequestCommentsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/resolvePullRequestCommentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); - $formattedNames = [ - $gapicClient->pullRequestCommentName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]', '[COMMENT]'), - ]; - $request = (new ResolvePullRequestCommentsRequest()) - ->setParent($formattedParent) - ->setNames($formattedNames); - $response = $gapicClient->resolvePullRequestComments($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/ResolvePullRequestComments', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getNames(); - $this->assertProtobufEquals($formattedNames, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resolvePullRequestCommentsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function resolvePullRequestCommentsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resolvePullRequestCommentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); - $formattedNames = [ - $gapicClient->pullRequestCommentName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]', '[COMMENT]'), - ]; - $request = (new ResolvePullRequestCommentsRequest()) - ->setParent($formattedParent) - ->setNames($formattedNames); - $response = $gapicClient->resolvePullRequestComments($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resolvePullRequestCommentsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function setIamPolicyRepoTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicyRepo($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/SetIamPolicyRepo', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyRepoExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicyRepo($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsRepoTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissionsRepo($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/TestIamPermissionsRepo', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsRepoExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissionsRepo($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function unresolvePullRequestCommentsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/unresolvePullRequestCommentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new UnresolvePullRequestCommentsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/unresolvePullRequestCommentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); - $formattedNames = [ - $gapicClient->pullRequestCommentName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]', '[COMMENT]'), - ]; - $request = (new UnresolvePullRequestCommentsRequest()) - ->setParent($formattedParent) - ->setNames($formattedNames); - $response = $gapicClient->unresolvePullRequestComments($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/UnresolvePullRequestComments', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getNames(); - $this->assertProtobufEquals($formattedNames, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/unresolvePullRequestCommentsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function unresolvePullRequestCommentsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/unresolvePullRequestCommentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); - $formattedNames = [ - $gapicClient->pullRequestCommentName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]', '[COMMENT]'), - ]; - $request = (new UnresolvePullRequestCommentsRequest()) - ->setParent($formattedParent) - ->setNames($formattedNames); - $response = $gapicClient->unresolvePullRequestComments($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/unresolvePullRequestCommentsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateBranchRuleTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateBranchRuleTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $etag = 'etag3123477'; - $includePattern = 'includePattern-1182351623'; - $disabled = true; - $requirePullRequest = false; - $minimumReviewsCount = 672799098; - $minimumApprovalsCount = 579210129; - $requireCodeOwnerApproval = false; - $requireCommentsResolved = false; - $allowStaleReviews = false; - $requireLinearHistory = true; - $expectedResponse = new BranchRule(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setEtag($etag); - $expectedResponse->setIncludePattern($includePattern); - $expectedResponse->setDisabled($disabled); - $expectedResponse->setRequirePullRequest($requirePullRequest); - $expectedResponse->setMinimumReviewsCount($minimumReviewsCount); - $expectedResponse->setMinimumApprovalsCount($minimumApprovalsCount); - $expectedResponse->setRequireCodeOwnerApproval($requireCodeOwnerApproval); - $expectedResponse->setRequireCommentsResolved($requireCommentsResolved); - $expectedResponse->setAllowStaleReviews($allowStaleReviews); - $expectedResponse->setRequireLinearHistory($requireLinearHistory); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateBranchRuleTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $branchRule = new BranchRule(); - $request = (new UpdateBranchRuleRequest()) - ->setBranchRule($branchRule); - $response = $gapicClient->updateBranchRule($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/UpdateBranchRule', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getBranchRule(); - $this->assertProtobufEquals($branchRule, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateBranchRuleTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateBranchRuleExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateBranchRuleTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $branchRule = new BranchRule(); - $request = (new UpdateBranchRuleRequest()) - ->setBranchRule($branchRule); - $response = $gapicClient->updateBranchRule($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateBranchRuleTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateHookTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateHookTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $targetUri = 'targetUri486946238'; - $disabled = true; - $uid = 'uid115792'; - $sensitiveQueryString = 'sensitiveQueryString1820021361'; - $expectedResponse = new Hook(); - $expectedResponse->setName($name); - $expectedResponse->setTargetUri($targetUri); - $expectedResponse->setDisabled($disabled); - $expectedResponse->setUid($uid); - $expectedResponse->setSensitiveQueryString($sensitiveQueryString); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateHookTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $hook = new Hook(); - $hookTargetUri = 'hookTargetUri737306680'; - $hook->setTargetUri($hookTargetUri); - $request = (new UpdateHookRequest()) - ->setHook($hook); - $response = $gapicClient->updateHook($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/UpdateHook', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getHook(); - $this->assertProtobufEquals($hook, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateHookTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateHookExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateHookTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $hook = new Hook(); - $hookTargetUri = 'hookTargetUri737306680'; - $hook->setTargetUri($hookTargetUri); - $request = (new UpdateHookRequest()) - ->setHook($hook); - $response = $gapicClient->updateHook($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateHookTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateIssueTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateIssueTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $title = 'title110371416'; - $body = 'body3029410'; - $etag = 'etag3123477'; - $expectedResponse = new Issue(); - $expectedResponse->setName($name); - $expectedResponse->setTitle($title); - $expectedResponse->setBody($body); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateIssueTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $issue = new Issue(); - $issueTitle = 'issueTitle1432889599'; - $issue->setTitle($issueTitle); - $request = (new UpdateIssueRequest()) - ->setIssue($issue); - $response = $gapicClient->updateIssue($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/UpdateIssue', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getIssue(); - $this->assertProtobufEquals($issue, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateIssueTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateIssueExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateIssueTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $issue = new Issue(); - $issueTitle = 'issueTitle1432889599'; - $issue->setTitle($issueTitle); - $request = (new UpdateIssueRequest()) - ->setIssue($issue); - $response = $gapicClient->updateIssue($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateIssueTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateIssueCommentTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateIssueCommentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $body = 'body3029410'; - $expectedResponse = new IssueComment(); - $expectedResponse->setName($name); - $expectedResponse->setBody($body); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateIssueCommentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $issueComment = new IssueComment(); - $issueCommentBody = 'issueCommentBody1153532424'; - $issueComment->setBody($issueCommentBody); - $request = (new UpdateIssueCommentRequest()) - ->setIssueComment($issueComment); - $response = $gapicClient->updateIssueComment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/UpdateIssueComment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getIssueComment(); - $this->assertProtobufEquals($issueComment, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateIssueCommentTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateIssueCommentExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateIssueCommentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $issueComment = new IssueComment(); - $issueCommentBody = 'issueCommentBody1153532424'; - $issueComment->setBody($issueCommentBody); - $request = (new UpdateIssueCommentRequest()) - ->setIssueComment($issueComment); - $response = $gapicClient->updateIssueComment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateIssueCommentTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updatePullRequestTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updatePullRequestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $title = 'title110371416'; - $body = 'body3029410'; - $expectedResponse = new PullRequest(); - $expectedResponse->setName($name); - $expectedResponse->setTitle($title); - $expectedResponse->setBody($body); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updatePullRequestTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $pullRequest = new PullRequest(); - $pullRequestTitle = 'pullRequestTitle13255662'; - $pullRequest->setTitle($pullRequestTitle); - $pullRequestBase = new Branch(); - $baseRef = 'baseRef-332628990'; - $pullRequestBase->setRef($baseRef); - $pullRequest->setBase($pullRequestBase); - $request = (new UpdatePullRequestRequest()) - ->setPullRequest($pullRequest); - $response = $gapicClient->updatePullRequest($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/UpdatePullRequest', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getPullRequest(); - $this->assertProtobufEquals($pullRequest, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updatePullRequestTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updatePullRequestExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updatePullRequestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $pullRequest = new PullRequest(); - $pullRequestTitle = 'pullRequestTitle13255662'; - $pullRequest->setTitle($pullRequestTitle); - $pullRequestBase = new Branch(); - $baseRef = 'baseRef-332628990'; - $pullRequestBase->setRef($baseRef); - $pullRequest->setBase($pullRequestBase); - $request = (new UpdatePullRequestRequest()) - ->setPullRequest($pullRequest); - $response = $gapicClient->updatePullRequest($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updatePullRequestTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updatePullRequestCommentTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updatePullRequestCommentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new PullRequestComment(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updatePullRequestCommentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $pullRequestComment = new PullRequestComment(); - $request = (new UpdatePullRequestCommentRequest()) - ->setPullRequestComment($pullRequestComment); - $response = $gapicClient->updatePullRequestComment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/UpdatePullRequestComment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getPullRequestComment(); - $this->assertProtobufEquals($pullRequestComment, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updatePullRequestCommentTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updatePullRequestCommentExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updatePullRequestCommentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $pullRequestComment = new PullRequestComment(); - $request = (new UpdatePullRequestCommentRequest()) - ->setPullRequestComment($pullRequestComment); - $response = $gapicClient->updatePullRequestComment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updatePullRequestCommentTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateRepositoryTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateRepositoryTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $instance = 'instance555127957'; - $uid = 'uid115792'; - $etag = 'etag3123477'; - $expectedResponse = new Repository(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setInstance($instance); - $expectedResponse->setUid($uid); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateRepositoryTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $repository = new Repository(); - $request = (new UpdateRepositoryRequest()) - ->setRepository($repository); - $response = $gapicClient->updateRepository($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/UpdateRepository', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getRepository(); - $this->assertProtobufEquals($repository, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateRepositoryTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateRepositoryExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateRepositoryTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $repository = new Repository(); - $request = (new UpdateRepositoryRequest()) - ->setRepository($repository); - $response = $gapicClient->updateRepository($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateRepositoryTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchCreatePullRequestCommentsAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchCreatePullRequestCommentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new BatchCreatePullRequestCommentsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/batchCreatePullRequestCommentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->pullRequestName('[PROJECT]', '[LOCATION]', '[REPOSITORY]', '[PULL_REQUEST]'); - $requests = []; - $request = (new BatchCreatePullRequestCommentsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); - $response = $gapicClient->batchCreatePullRequestCommentsAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.securesourcemanager.v1.SecureSourceManager/BatchCreatePullRequestComments', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getRequests(); - $this->assertProtobufEquals($requests, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchCreatePullRequestCommentsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -}